如何查看 Linux 中所有正在运行的服务
有许多方法和工具可以查看 Linux 中所有正在运行的服务。大多数管理员会在 System V(SysV)初始化系统中使用 service service-name status 或 /etc/init.d/service-name status,而在 systemd 初始化系统中使用 systemctl status service-name。
以上命令可以清楚地显示该服务是否在服务器上运行,这也是每个 Linux 管理员都该知道的非常简单和基础的命令。
如果你对系统环境并不熟悉,也不清楚系统在运行哪些服务,你会如何检查?
是的,我们的确有必要这样检查一下。这将有助于我们了解系统上运行了什么服务,以及哪些是必要的、哪些需要被禁用。
init(初始化initialization的简称)是在系统启动期间运行的第一个进程。init 是一个守护进程,它将持续运行直至关机。
大多数 Linux 发行版都使用如下的初始化系统之一:
- System V 是更老的初始化系统
- Upstart 是一个基于事件的传统的初始化系统的替代品
- systemd 是新的初始化系统,它已经被大多数最新的 Linux 发行版所采用
什么是 System V(SysV)
SysV(意即 System V) 初始化系统是早期传统的初始化系统和系统管理器。由于 sysVinit 系统上一些长期悬而未决的问题,大多数最新的发行版都适用于 systemd 系统。
什么是 Upstart 初始化系统
Upstart 是一个基于事件的 /sbin/init 的替代品,它控制在启动时的任务和服务的开始,在关机时停止它们,并在系统运行时监控它们。
它最初是为 Ubuntu 发行版开发的,但其是以适合所有 Linux 发行版的开发为目标的,以替换过时的 System-V 初始化系统。
什么是 systemd
systemd 是一个新的初始化系统以及系统管理器,它已成为大多数 Linux 发行版中非常流行且广泛适应的新的标准初始化系统。systemctl 是一个 systemd 管理工具,它可以帮助我们管理 systemd 系统。
方法一:如何在 System V(SysV)系统中查看运行的服务
以下命令可以帮助我们列出 System V(SysV) 系统中所有正在运行的服务。
如果服务很多,我建议使用文件查看命令,如 less、more 等,以便得到清晰的结果。
# service --status-all或# service --status-all | more或# service --status-all | less
abrt-ccpp hook is installedabrtd (pid 2131) is running...abrt-dump-oops is stoppedacpid (pid 1958) is running...atd (pid 2164) is running...auditd (pid 1731) is running...Frequency scaling enabled using ondemand governorcrond (pid 2153) is running...hald (pid 1967) is running...htcacheclean is stoppedhttpd is stoppedTable: filterChain INPUT (policy ACCEPT)num target prot opt source destination1 ACCEPT all ::/0 ::/0 state RELATED,ESTABLISHED2 ACCEPT icmpv6 ::/0 ::/03 ACCEPT all ::/0 ::/04 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:805 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:216 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:227 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:258 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:20829 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:208610 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:208311 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:208712 ACCEPT tcp ::/0 ::/0 state NEW tcp dpt:1000013 REJECT all ::/0 ::/0 reject-with icmp6-adm-prohibitedChain FORWARD (policy ACCEPT)num target prot opt source destination1 REJECT all ::/0 ::/0 reject-with icmp6-adm-prohibitedChain OUTPUT (policy ACCEPT)num target prot opt source destinationiptables: Firewall is not running.irqbalance (pid 1826) is running...Kdump is operationallvmetad is stoppedmdmonitor is stoppedmessagebus (pid 1929) is running...SUCCESS! MySQL running (24376)rndc: neither /etc/rndc.conf nor /etc/rndc.key was foundnamed is stoppednetconsole module not loadedUsage: startup.sh { start | stop }Configured devices:lo eth0 eth1Currently active devices:lo eth0ntpd is stoppedportreserve (pid 1749) is running...master (pid 2107) is running...Process accounting is disabled.quota_nld is stoppedrdisc is stoppedrngd is stoppedrpcbind (pid 1840) is running...rsyslogd (pid 1756) is running...sandbox is stoppedsaslauthd is stoppedsmartd is stoppedopenssh-daemon (pid 9859) is running...svnserve is stoppedvsftpd (pid 4008) is running...xinetd (pid 2031) is running...zabbix_agentd (pid 2150 2149 2148 2147 2146 2140) is running...
执行以下命令,可以只查看正在运行的服务:
# service --status-all | grep running
crond (pid 535) is running...httpd (pid 627) is running...mysqld (pid 911) is running...rndc: neither /etc/rndc.conf nor /etc/rndc.key was foundrsyslogd (pid 449) is running...saslauthd (pid 492) is running...sendmail (pid 509) is running...sm-client (pid 519) is running...openssh-daemon (pid 478) is running...xinetd (pid 485) is running...
运行以下命令以查看指定服务的状态:
# service --status-all | grep httpdhttpd (pid 627) is running...
或者,使用以下命令也可以查看指定服务的状态:
# service httpd statushttpd (pid 627) is running...
使用以下命令查看系统启动时哪些服务会被启用:
# chkconfig --list
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:offhtcacheclean 0:off 1:off 2:off 3:off 4:off 5:off 6:offhttpd 0:off 1:off 2:off 3:on 4:off 5:off 6:offip6tables 0:off 1:off 2:on 3:off 4:on 5:on 6:offiptables 0:off 1:off 2:on 3:on 4:on 5:on 6:offmodules_dep 0:off 1:off 2:on 3:on 4:on 5:on 6:offmysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:offnamed 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetfs 0:off 1:off 2:off 3:off 4:on 5:on 6:offnetwork 0:off 1:off 2:on 3:on 4:on 5:on 6:offnmb 0:off 1:off 2:off 3:off 4:off 5:off 6:offnscd 0:off 1:off 2:off 3:off 4:off 5:off 6:offportreserve 0:off 1:off 2:on 3:off 4:on 5:on 6:offquota_nld 0:off 1:off 2:off 3:off 4:off 5:off 6:offrdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:offrestorecond 0:off 1:off 2:off 3:off 4:off 5:off 6:offrpcbind 0:off 1:off 2:on 3:off 4:on 5:on 6:offrsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:offsaslauthd 0:off 1:off 2:off 3:on 4:off 5:off 6:offsendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:offsmb 0:off 1:off 2:off 3:off 4:off 5:off 6:offsnmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:offsnmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:offsshd 0:off 1:off 2:on 3:on 4:on 5:on 6:offudev-post 0:off 1:on 2:on 3:off 4:on 5:on 6:offwinbind 0:off 1:off 2:off 3:off 4:off 5:off 6:offxinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:offxinetd based services:chargen-dgram: offchargen-stream: offdaytime-dgram: offdaytime-stream: offdiscard-dgram: offdiscard-stream: offecho-dgram: offecho-stream: offfinger: offntalk: offrsync: offtalk: offtcpmux-server: offtime-dgram: offtime-stream: off
方法二:如何在 System V(SysV)系统中查看运行的服务
另外一种在 Linux 系统上列出运行的服务的方法是使用 initctl 命令:
# initctl listrc stop/waitingtty (/dev/tty3) start/running, process 1740tty (/dev/tty2) start/running, process 1738tty (/dev/tty1) start/running, process 1736tty (/dev/tty6) start/running, process 1746tty (/dev/tty5) start/running, process 1744tty (/dev/tty4) start/running, process 1742plymouth-shutdown stop/waitingcontrol-alt-delete stop/waitingrcS-emergency stop/waitingreadahead-collector stop/waitingkexec-disable stop/waitingquit-plymouth stop/waitingrcS stop/waitingprefdm stop/waitinginit-system-dbus stop/waitingck-log-system-restart stop/waitingreadahead stop/waitingck-log-system-start stop/waitingsplash-manager stop/waitingstart-ttys stop/waitingreadahead-disable-services stop/waitingck-log-system-stop stop/waitingrcS-sulogin stop/waitingserial stop/waiting
方法三:如何在 systemd 系统中查看运行的服务
以下命令帮助我们列出 systemd 系统中所有服务:
# systemctlUNIT LOAD ACTIVE SUB DESCRIPTIONsys-devices-virtual-block-loop0.device loaded active plugged /sys/devices/virtual/block/loop0sys-devices-virtual-block-loop1.device loaded active plugged /sys/devices/virtual/block/loop1sys-devices-virtual-block-loop2.device loaded active plugged /sys/devices/virtual/block/loop2sys-devices-virtual-block-loop3.device loaded active plugged /sys/devices/virtual/block/loop3sys-devices-virtual-block-loop4.device loaded active plugged /sys/devices/virtual/block/loop4sys-devices-virtual-misc-rfkill.device loaded active plugged /sys/devices/virtual/misc/rfkillsys-devices-virtual-tty-ttyprintk.device loaded active plugged /sys/devices/virtual/tty/ttyprintksys-module-fuse.device loaded active plugged /sys/module/fusesys-subsystem-net-devices-enp0s3.device loaded active plugged 82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter)-.mount loaded active mounted Root Mountdev-hugepages.mount loaded active mounted Huge Pages File Systemdev-mqueue.mount loaded active mounted POSIX Message Queue File Systemrun-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfsrun-user-1000.mount loaded active mounted /run/user/1000snap-core-3887.mount loaded active mounted Mount unit for coresnap-core-4017.mount loaded active mounted Mount unit for coresnap-core-4110.mount loaded active mounted Mount unit for coresnap-gping-13.mount loaded active mounted Mount unit for gpingsnap-termius\x2dapp-8.mount loaded active mounted Mount unit for termius-appsys-fs-fuse-connections.mount loaded active mounted FUSE Control File Systemsys-kernel-debug.mount loaded active mounted Debug File Systemacpid.path loaded active running ACPI Events Checkcups.path loaded active running CUPS Schedulersystemd-ask-password-plymouth.path loaded active waiting Forward Password Requests to Plymouth Directory Watchsystemd-ask-password-wall.path loaded active waiting Forward Password Requests to Wall Directory Watchinit.scope loaded active running System and Service Managersession-c2.scope loaded active running Session c2 of user magiaccounts-daemon.service loaded active running Accounts Serviceacpid.service loaded active running ACPI event daemonanacron.service loaded active running Run anacron jobsapache2.service loaded active running The Apache HTTP Serverapparmor.service loaded active exited AppArmor initializationapport.service loaded active exited LSB: automatic crash report generationaptik-battery-monitor.service loaded active running LSB: start/stop the aptik battery monitor daemonatop.service loaded active running Atop advanced performance monitoratopacct.service loaded active running Atop process accounting daemonavahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stackcolord.service loaded active running Manage, Install and Generate Color Profilesconsole-setup.service loaded active exited Set console font and keymapcron.service loaded active running Regular background program processing daemoncups-browsed.service loaded active running Make remote CUPS printers available locallycups.service loaded active running CUPS Schedulerdbus.service loaded active running D-Bus System Message Buspostfix.service loaded active exited Postfix Mail Transport Agent
UNIT相应的 systemd 单元名称LOAD相应的单元是否被加载到内存中ACTIVE该单元是否处于活动状态SUB该单元是否处于运行状态(LCTT 译注:是较于 ACTIVE 更加详细的状态描述,不同的单元类型有不同的状态。)DESCRIPTION关于该单元的简短描述
以下选项可根据类型列出单元:
# systemctl list-units --type serviceUNIT LOAD ACTIVE SUB DESCRIPTIONaccounts-daemon.service loaded active running Accounts Serviceacpid.service loaded active running ACPI event daemonanacron.service loaded active running Run anacron jobsapache2.service loaded active running The Apache HTTP Serverapparmor.service loaded active exited AppArmor initializationapport.service loaded active exited LSB: automatic crash report generationaptik-battery-monitor.service loaded active running LSB: start/stop the aptik battery monitor daemonatop.service loaded active running Atop advanced performance monitoratopacct.service loaded active running Atop process accounting daemonavahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stackcolord.service loaded active running Manage, Install and Generate Color Profilesconsole-setup.service loaded active exited Set console font and keymapcron.service loaded active running Regular background program processing daemoncups-browsed.service loaded active running Make remote CUPS printers available locallycups.service loaded active running CUPS Schedulerdbus.service loaded active running D-Bus System Message Busfwupd.service loaded active running Firmware update daemongetty@tty1.service loaded active running Getty on tty1grub-common.service loaded active exited LSB: Record successful boot for GRUBirqbalance.service loaded active running LSB: daemon to balance interrupts for SMP systemskeyboard-setup.service loaded active exited Set the console keyboard layoutkmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
以下选项可帮助您根据状态列出单位,输出与前例类似但更直截了当:
# systemctl list-unit-files --type serviceUNIT FILE STATEaccounts-daemon.service enabledacpid.service disabledalsa-restore.service staticalsa-state.service staticalsa-utils.service maskedanacron-resume.service enabledanacron.service enabledapache-htcacheclean.service disabledapache-htcacheclean@.service disabledapache2.service enabledapache2@.service disabledapparmor.service enabledapport-forward@.service staticapport.service generatedapt-daily-upgrade.service staticapt-daily.service staticaptik-battery-monitor.service generatedatop.service enabledatopacct.service enabledautovt@.service enabledavahi-daemon.service enabledbluetooth.service enabled
运行以下命令以查看指定服务的状态:
# systemctl | grep apache2apache2.service loaded active running The Apache HTTP Server
或者,使用以下命令也可查看指定服务的状态:
# systemctl status apache2● apache2.service - The Apache HTTP ServerLoaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)Drop-In: /lib/systemd/system/apache2.service.d└─apache2-systemd.confActive: active (running) since Tue 2018-03-06 12:34:09 IST; 8min agoProcess: 2786 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)Main PID: 1171 (apache2)Tasks: 55 (limit: 4915)CGroup: /system.slice/apache2.service├─1171 /usr/sbin/apache2 -k start├─2790 /usr/sbin/apache2 -k start└─2791 /usr/sbin/apache2 -k startMar 06 12:34:08 magi-VirtualBox systemd[1]: Starting The Apache HTTP Server...Mar 06 12:34:09 magi-VirtualBox apachectl[1089]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.2.15. Set the 'ServerName' directive globally to suppreMar 06 12:34:09 magi-VirtualBox systemd[1]: Started The Apache HTTP Server.Mar 06 12:39:10 magi-VirtualBox systemd[1]: Reloading The Apache HTTP Server.Mar 06 12:39:10 magi-VirtualBox apachectl[2786]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using fe80::7929:4ed1:279f:4d65. Set the 'ServerName' directive glMar 06 12:39:10 magi-VirtualBox systemd[1]: Reloaded The Apache HTTP Server.
执行以下命令,只查看正在运行的服务:
# systemctl | grep runningacpid.path loaded active running ACPI Events Checkcups.path loaded active running CUPS Schedulerinit.scope loaded active running System and Service Managersession-c2.scope loaded active running Session c2 of user magiaccounts-daemon.service loaded active running Accounts Serviceacpid.service loaded active running ACPI event daemonapache2.service loaded active running The Apache HTTP Serveraptik-battery-monitor.service loaded active running LSB: start/stop the aptik battery monitor daemonatop.service loaded active running Atop advanced performance monitoratopacct.service loaded active running Atop process accounting daemonavahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stackcolord.service loaded active running Manage, Install and Generate Color Profilescron.service loaded active running Regular background program processing daemoncups-browsed.service loaded active running Make remote CUPS printers available locallycups.service loaded active running CUPS Schedulerdbus.service loaded active running D-Bus System Message Busfwupd.service loaded active running Firmware update daemongetty@tty1.service loaded active running Getty on tty1irqbalance.service loaded active running LSB: daemon to balance interrupts for SMP systemslightdm.service loaded active running Light Display ManagerModemManager.service loaded active running Modem ManagerNetworkManager.service loaded active running Network Managerpolkit.service loaded active running Authorization Manager
使用以下命令查看系统启动时会被启用的服务列表:
# systemctl list-unit-files | grep enabledacpid.path enabledcups.path enabledaccounts-daemon.service enabledanacron-resume.service enabledanacron.service enabledapache2.service enabledapparmor.service enabledatop.service enabledatopacct.service enabledautovt@.service enabledavahi-daemon.service enabledbluetooth.service enabledconsole-setup.service enabledcron.service enabledcups-browsed.service enabledcups.service enableddisplay-manager.service enableddns-clean.service enabledfriendly-recovery.service enabledgetty@.service enabledgpu-manager.service enabledkeyboard-setup.service enabledlightdm.service enabledModemManager.service enablednetwork-manager.service enablednetworking.service enabledNetworkManager-dispatcher.service enabledNetworkManager-wait-online.service enabledNetworkManager.service enabled
systemd-cgtop 按资源使用情况(任务、CPU、内存、输入和输出)列出控制组:
# systemd-cgtopControl Group Tasks %CPU Memory Input/s Output/s/ - - 1.5G - -/init.scope 1 - - - -/system.slice 153 - - - -/system.slice/ModemManager.service 3 - - - -/system.slice/NetworkManager.service 4 - - - -/system.slice/accounts-daemon.service 3 - - - -/system.slice/acpid.service 1 - - - -/system.slice/apache2.service 55 - - - -/system.slice/aptik-battery-monitor.service 1 - - - -/system.slice/atop.service 1 - - - -/system.slice/atopacct.service 1 - - - -/system.slice/avahi-daemon.service 2 - - - -/system.slice/colord.service 3 - - - -/system.slice/cron.service 1 - - - -/system.slice/cups-browsed.service 3 - - - -/system.slice/cups.service 2 - - - -/system.slice/dbus.service 6 - - - -/system.slice/fwupd.service 5 - - - -/system.slice/irqbalance.service 1 - - - -/system.slice/lightdm.service 7 - - - -/system.slice/polkit.service 3 - - - -/system.slice/repowerd.service 14 - - - -/system.slice/rsyslog.service 4 - - - -/system.slice/rtkit-daemon.service 3 - - - -/system.slice/snapd.service 8 - - - -/system.slice/system-getty.slice 1 - - - -
同时,我们可以使用 pstree 命令(输出来自 SysVinit 系统)查看正在运行的服务:
# pstreeinit-+-crond|-httpd---2*[httpd]|-kthreadd/99149---khelper/99149|-2*[mingetty]|-mysqld_safe---mysqld---9*[{mysqld}]|-rsyslogd---3*[{rsyslogd}]|-saslauthd---saslauthd|-2*[sendmail]|-sshd---sshd---bash---pstree|-udevd`-xinetd
我们还可以使用 pstree 命令(输出来自 systemd 系统)查看正在运行的服务:
# pstreesystemd─┬─ModemManager─┬─{gdbus}│ └─{gmain}├─NetworkManager─┬─dhclient│ ├─{gdbus}│ └─{gmain}├─accounts-daemon─┬─{gdbus}│ └─{gmain}├─acpid├─agetty├─anacron├─apache2───2*[apache2───26*[{apache2}]]├─aptd───{gmain}├─aptik-battery-m├─atop├─atopacctd├─avahi-daemon───avahi-daemon├─colord─┬─{gdbus}│ └─{gmain}├─cron├─cups-browsed─┬─{gdbus}│ └─{gmain}├─cupsd├─dbus-daemon├─fwupd─┬─{GUsbEventThread}│ ├─{fwupd}│ ├─{gdbus}│ └─{gmain}├─gnome-keyring-d─┬─{gdbus}│ ├─{gmain}│ └─{timer}
方法四:如何使用 chkservice 在 systemd 系统中查看正在运行的服务
chkservice 是一个管理系统单元的终端工具,需要超级用户权限。
# chkservice

要查看帮助页面,请按下 ? ,它将显示管理 systemd 服务的可用选项。

via: https://www.2daygeek.com/how-to-check-all-running-services-in-linux/
作者:Magesh Maruthamuthu 译者:jessie-pang 校对:wxy
如何查看 Linux 中所有正在运行的服务的更多相关文章
- 在本机eclipse中创建maven项目,查看linux中hadoop下的文件、在本机搭建hadoop环境
注意 第一次建立maven项目时需要在联网情况下,因为他会自动下载一些东西,不然突然终止 需要手动删除断网前建立的文件 在eclipse里新建maven项目步骤 直接新建maven项目出了错 ...
- 如何在Linux中使用Firejail运行应用程序
有时您可能希望使用在不同环境中未经过良好测试的应用程序,但您必须使用它们.在这种情况下,关注系统的安全性是正常的.在Linux中可以做的一件事是在沙箱中使用应用程序. “沙盒”是在有限环境中运行应用程 ...
- 如何在Linux中tomcat下运行一个web项目
如何在Linux中tomcat下运行一个web项目 然后启动Tomcat项目.运行的运行后会自动将war包解压. 如果页面报404,那么请查看tomcat日志文件,它一定是报错了....
- 在Linux中通过Top运行进程查找最高内存和CPU使用率
按内存使用情况查找前15个进程,在批处理模式下为"top" 使用top命令查看有关当前状态,系统使用情况的更详细信息:正常运行时间,负载平均值和进程总数. 分类:Linux命令操作 ...
- 查看linux中某个端口(port)是否被占用(netstat,lsof)
查看linux中某个端口(port)是否被占用(netstat,lsof) netstat命令可以显示网络连接,路由表,接口状态,伪装连接,网络链路信息和组播成员组等信息.命令格式:netstat [ ...
- 查看linux中的TCP连接数【转】
转自:http://blog.csdn.net/he_jian1/article/details/40787269 查看linux中的TCP连接数 本文章已收录于: 计算机网络知识库 分类: ...
- LSOF查看linux中文件打开情况
如何查看linux中文件打开情况 前言 我们都知道,在linux下,“一切皆文件”,因此有时候查看文件的打开情况,就显得格外重要,而这里有一个命令能够在这件事上很好的帮助我们-它就是lsof. lin ...
- 查看linux中所有用户的三种方式
通过使用/etc/passwd 文件,getent命令,compgen命令这三种方法查看系统中用户的信息. Linux 系统中用户信息存放在/etc/passwd文件中. 这是一个包含每个用户基本信息 ...
- 如何查看Linux系统下程序运行时使用的库?
Linux系统下程序运行会实时的用到相关动态库,某些场景下,比如需要裁剪不必要的动态库时,就需要查看哪些动态库被用到了. 以运行VLC为例. VLC开始运行后,首先查看vlc的PID,比如这次查到的V ...
随机推荐
- 【codeforces 239B】Easy Tape Programming
[题目链接]:http://codeforces.com/contest/239/problem/B [题意] 给你一个长度为n的字符串,只包括'<">'以及数字0到9; 给你q ...
- vps上运行serv-u的问题
为了给产品环境建个测试站,今天特意申请一个vps来做开发用,但运行了Serv-U的ServUDaemon.exe后始终提示: 响应: 530 User czhan cannot log in. 很无语 ...
- hadoop1.1.0的伪分布搭建步骤
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbWFuYnVyZW4wMQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...
- Cubieboard学习资源
1.Cubieboard2学习系列学习教程. 2.Cubieboard安装server成功,ssh远程登录. 3.CubieBoard2 A20学习笔记. 4.一个学习CubieTruck的站点. 5 ...
- HDU 5310 Souvenir
Souvenir Accepts: 901 Submissions: 2743 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262 ...
- bzoj1016: [JSOI2008]最小生成树计数(kruskal+dfs)
1016: [JSOI2008]最小生成树计数 题目:传送门 题解: 神题神题%%% 据说最小生成树有两个神奇的定理: 1.权值相等的边在不同方案数中边数相等 就是说如果一种方案中权值为1的边有n条 ...
- android JNI 一维数组、二维数组的访问与使用
在JNI中访问JAVA类中的整型.浮点型.字符型的数据比较简单,举一个简单的例子,如下: //得到类名 jclass cls = (*env)->GetObjectClass(env, obj) ...
- [湖南师大集训2018 7 26] hunger 解题报告 (SPFA)
饿 (hungry.pas/c/cpp) [背景描述] 给出
- String slices
String slices A segment of a string is called a slice. Selecting a slice is similar selecting a char ...
- [学习笔记]BS架构与CS架构
整理自:http://www.iteye.com/problems/102411 前两天面试的时候被问到这个问题,没有回答上来因此在这里学习整理一下. B/S架构 B/S架构的全称为Browser/S ...