进程管理

系统监控工具
进程管理工具
kill -l 信号种类
httpd主页实验(kill -1)
前后台切换

系统监控工具

dstat、vmstat、iostat

[root@centos7 ~]# dstat 
You did not select any stats, using -cdngy by default.
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw 
  1   1  98   1   0   0| 271k  216k|   0     0 |   0     3B| 154   184 
  0   0 100   0   0   0|   0     0 | 240B  870B|   0     0 |  53    71 
  1   0 100   0   0   0|   0     0 | 540B  390B|   0     0 |  54    69 
  0   0 100   0   0   0|   0     0 | 240B  390B|   0     0 |  37    55 
  0   0 100   0   0   0|   0     0 | 240B  390B|   0     0 |  63    78 
  0   0 100   0   0   0|   0     0 | 780B  390B|   0     0 |  47    55 
  0   0 100   0   0   0|   0     0 |1020B  390B|   0     0 |  66    73 
  0   0 100   0   0   0|   0  1024B| 544B  390B|   0     0 |  54    67 
  0   0 100   0   0   0|   0  4096B| 950B  390B|   0     0 |  74    85 
  0   0 100   0   0   0|   0     0 | 488B  390B|   0     0 |  47    65 ^C
[root@centos7 ~]# dstat -c
----total-cpu-usage----
usr sys idl wai hiq siq
  1   1  97   1   0   0
  0   0 100   0   0   0
  0   0 100   0   0   0
  0   0 100   0   0   0
  0   0 100   0   0   0
  0   0 100   0   0   0^C
[root@centos7 ~]# dstat -d
-dsk/total-
 read  writ
 347k  285k
   0    16k
   0     0 
   0     0 
   0     0 
   0     0 
   0     0 
   0     0 ^C
[root@centos7 ~]# dstat -g
---paging--
  in   out 
   0     4B
   0     0 
   0     0 
   0     0 
   0     0 
   0     0 ^C
[root@centos7 ~]# dstat -m
------memory-usage-----
 used  buff  cach  free
 594M 40.0k 1060M  169M
 595M 40.0k 1060M  169M
 595M 40.0k 1060M  169M
 595M 40.0k 1060M  169M
 595M 40.0k 1060M  169M^C
[root@centos7 ~]# dstat -p
---procs---
run blk new
  0   0 1.0
  0   0   0
  0   0   0
  0   0   0^C
[root@centos7 ~]# dstat -r
--io/total-
 read  writ
6.27  1.19 
   0     0 
   0     0 
   0     0 
   0     0 ^C
[root@centos7 ~]# dstat -s
----swap---
 used  free
  12k 4096M
  12k 4096M
  12k 4096M^C
[root@centos7 ~]# sdtat --tcp
bash: sdtat: command not found...
Similar command is: 'dstat'
[root@centos7 ~]# dstat --tcp  
----tcp-sockets----
lis act syn tim clo
 10   2   0   0   0
 10   2   0   0   0
 10   2   0   0   0
 10   2   0   0   0^C
[root@centos7 ~]# dstat udp
You did not select any stats, using -cdngy by default.
dstat: incorrect argument, try dstat -h for the correct syntax
[root@centos7 ~]# dstat --udp
--udp--
lis act
 10   0
 10   0
 10   0
 10   0
 10   0^C
[root@centos7 ~]# dstat --unix
--unix-sockets-
dgm str lis act
 41 443  66 377
 41 443  66 377
 41 443  66 377
 41 443  66 377^C
[root@centos7 ~]# dstat --raw
raw
raw
  0
  0
  0
  0
  0
  0^C
[root@centos7 ~]# dstat --socket
------sockets------
tot tcp udp raw frg
  1   7   8   0   0
  1   7   8   0   0
  1   7   8   0   0^C
[root@centos7 ~]# dstat --ipc
--sysv-ipc-
msg sem shm
  0   0   2
  0   0   2
  0   0   2^C
[root@centos7 ~]# dstat --top-cpu
-most-expensive-
  cpu process   
vmtoolsd     0.1
vmtoolsd     0.5
vmtoolsd     0.5
kworker/0:2  0.5
xfsaild/sda2 0.5
vmtoolsd     0.5
rcu_sched    0.5
vmtoolsd     0.5             
vmtoolsd     0.5
vmtoolsd     0.5
-most-expensive-
  cpu process                   
ksmtuned     0.5               
irqbalance   0.5^C
[root@centos7 ~]# dstat --top-io
----most-expensive----
     i/o process      
packagekitd 386k  174k
sshd: root@ 146B  240B
sshd: root@  78B  160B
sshd: root@  78B  160B
irqbalance 6144B    0 
sshd: root@  71B  160B
sshd: root@  78B  160B
vmtoolsd   9744B    0 
sshd: root@  71B  160B^C
[root@centos7 ~]# dstat --top-mem
--most-expensive-
  memory process 
gnome-shell  145M
gnome-shell  145M
gnome-shell  145M
gnome-shell  145M
gnome-shell  145M^C
[root@centos7 ~]# dstat --top-latency
--highest-total--
 latency process 
rcu_sched     817
ksoftirqd/1  3391
ksoftirqd/1  1090
rcu_sched     994
rcu_sched    1048
kworker/1:2   123
ksoftirqd/1   981
xfsaild/sda2  136
rcu_sched    1063
ksoftirqd/1  1029^C
[root@centos7 ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0     12 133548     40 1229856    0    0   166   134   88  103  1  1 97  1  0
[root@centos7 ~]# iostat
Linux 3.10.0-514.el7.x86_64 (centos7.bai.com)   07/01/2017      _x86_64_        (2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.25    0.78    0.72    0.98    0.00   97.27

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
scd0              0.01         0.02         0.00         66          0
sda              10.58       332.49       265.27    1013497     808601
sdb               0.05         0.34         0.00       1044          0
sdc               0.05         0.34         0.00       1044          0
sdd               0.05         0.34         0.00       1044          0

进程管理工具;
pidof、pgerp 、ps aux 、pstree
kill -l、trap -l

#pidof bc查看进程编号
[root@centos7 ~]# bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
[root@centos7 ~]# pidof bc
5730
[root@centos7 ~]# kill -3 5730
[root@centos7 ~]# bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
^\Quit (core dumped)
[root@centos7 ~]# 
相当于quite命令退出
kill -l  信号种类
[root@centos7 ~]# kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX

[root@centos7 ~]# trap -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX

###trap -l   、 kill -l 查看信号管理种类
1---无需关闭进程,将其重新读取配置文件
2---终止正在运行中的进程:相当于ctrl+c
3---相当于ctrl+\ 相当用quit命令退出
9---强制杀死正在运行中的进程
15---终止运行的进程,相当于kill  、可以不写 -15。打开vim用15关闭进程,不能保存文件。
18---继续运行
19---后台休眠

pgrep命令 
查询当前某个用户开启了那些进程

pgrep -U bai发起者进程编号      
      -aU     进程名称
pgrep -u bai 生效者进程编号
pgrep -au bai 
pstree 查看树状结构进程编号
[bai@centos7 ~]$ ping 127.1
PING 127.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.113 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.046 ms

[root@centos7 ~]# pgrep -aU bai
6026 -bash
6070 ping 127.1

[root@centos7 ~]# pgrep -u bai 
6026
6070
[root@centos7 ~]# pgrep -au bai
6026 -bash
6070 ping 127.1

kill -15
杀父进程
[root@centos7 ~]# pgrep -aU bai
6026 -bash
6259 ping 127.1
[root@centos7 ~]# pgrep -au bai
6026 -bash
6259 ping 127.1
[root@centos7 ~]# kill 6026
[root@centos7 ~]# pgrep -au bai
6026 -bash
6259 ping 127.1
[root@centos7 ~]# pgrep -aU bai
6026 -bash
6259 ping 127.1
[root@centos7 ~]# 
不起作用 15命令

kill -9 
1、[root@centos7 ~]# pgrep -aU bai
7095 -bash
7135 vim f
[root@centos7 ~]# kill -9 7095
[root@centos7 ~]# pgrep -aU bai
ping特殊
2、[root@centos7 ~]# pgrep -au bai
7261 -bash
7301 ping 127.1
[root@centos7 ~]# kill -9 7261
[root@centos7 ~]# pgrep -au bai
7301 ping 127.1
再生进程
[root@centos6 ~]#ps aux |grep ming    
root       2616  0.0  0.0   4068   540 tty2     Ss+  02:38   0:00 /sbin/mingetty /dev/tty2
root       2618  0.0  0.0   4068   540 tty3     Ss+  02:38   0:00 /sbin/mingetty /dev/tty3
root       2620  0.0  0.0   4068   544 tty4     Ss+  02:38   0:00 /sbin/mingetty /dev/tty4
root       2626  0.0  0.0   4068   544 tty5     Ss+  02:38   0:00 /sbin/mingetty /dev/tty5
root       2640  0.0  0.0   4068   544 tty6     Ss+  02:38   0:00 /sbin/mingetty /dev/tty6
root       4549  0.0  0.0 103336   852 pts/1    S+   07:28   0:00 grep ming
kill 1 杀死父进程,不能在生成
###killall bash
[root@centos7 ~]# pidof bash
4020 2152 648
[root@centos7 ~]# killall bash
可以杀死所有bash进程
[root@centos7 ~]# killall vim
[root@centos7 ~]# pidof vim
4230 4229
[root@centos7 ~]# killall -9 vim
[root@centos7 ~]# pidof vim

###pkill 支持模式 信号杀进程 与kill 类似
杀进程终端,
[root@centos7 ~]# w
 15:05:21 up 3 min,  3 users,  load average: 0.20, 0.45, 0.22
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     :0       :0               15:02   ?xdm?  16.50s  0.33s gdm-session-worker [pam/gdm-autologin]
root     pts/0    192.168.239.1    15:03    1.00s  0.08s  0.03s w
root     pts/2    192.168.239.1    15:04   33.00s  0.06s  0.06s -bash
[root@centos7 ~]# who
root     pts/1        2017-07-01 13:04 (192.168.239.1)
root     :0           2017-07-01 13:04 (:0)
root     pts/0        2017-07-01 14:22 (192.168.239.1)
root     pts/2        2017-07-01 14:29 (192.168.239.1)
[root@centos7 ~]# tty
/dev/pts/1
[root@centos7 ~]# pgrep -t pts/0     
4020
[root@centos7 ~]# tty
/dev/pts/0
[root@centos7 ~]# pgrep -t /dev/pts/0
[root@centos7 ~]# pgrep -t pts/0     
4020
[root@centos7 ~]# pkill -t pts/0
[root@centos7 ~]# pgrep -t pts/0
4020
[root@centos7 ~]# pkill -t pts/0 -9
[root@centos7 ~]# pgrep -t pts/0
httpd主页实验(kill -1);
安装好httpd服务、links;
#kill -1 重新读取配置文件
###nmcli connection reload ,重新新读取配置文件

修改服务配置文件;
vim /etc/httpd/conf/httpd.conf
修改目录后的变化
centos7
#cd /var/www/html 存放外部服务主页文件所在的目录
#echo www.mage.com > index.html
创建主页
#systemctl status httpd
查看是否启用服务
#systemctl start httpd
 启用服务
#links 192.168.8.133
  CENTOS6启用字符界面游览器
#yum -y install links
安装字符游览器
centos7
#iptables -vnL
产看防火墙
#iptables -F
关闭防火墙
#links 192...
echo testpage > test.html
#links 192.168.8.133/taes.html 
更改主页位置
mkdir /var/www/newsite
echo  new site page > /var/www/newsite/index.html
放到新的目录
需要在配置文件更改路径;/var/www/newsite/
不用重启发信号可以启用,查看发到哪个进程上,重新读取配置文件
#pstree 查看进程
httpd 父进程;
#ps axu 
#kill 1 (hup) 3287 
#links 192.168.8.133
 vim /etc/httpd/conf/httpd.conf
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
"/etc/httpd/conf/httpd.conf" 1009L, 34419C
前后台切换
#ping 127.1
前端执行敲命令不起作用
#pidof ping 
查看进程编号
#kill -19 +进程编号
后台暂停
[root@centos7 ~]# w
 15:20:47 up 18 min,  3 users,  load average: 0.01, 0.04, 0.11
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     :0       :0               15:02   ?xdm?  20.00s  0.34s gdm-session-worker [pam/gdm-autologin]
root     pts/0    192.168.239.1    15:03    7.00s  0.06s  0.00s ping 127.1
root     pts/2    192.168.239.1    15:04    7.00s  0.10s  0.04s w
[root@centos7 ~]# 
[root@centos7 ~]# pidof ping
3368
[root@centos7 ~]# kill -19 3368
[root@centos7 ~]# pidof ping   
3380 3368
[root@centos7 ~]# killall -19 ping

64 bytes from 127.0.0.1: icmp_seq=48 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=49 ttl=64 time=0.051 ms
64 bytes from 127.0.0.1: icmp_seq=50 ttl=64 time=0.055 ms
64 bytes from 127.0.0.1: icmp_seq=51 ttl=64 time=0.052 ms
64 bytes from 127.0.0.1: icmp_seq=52 ttl=64 time=0.052 ms

[2]+  Stopped                 ping 127.1
[root@centos7 ~]# ls
anaconda-ks.cfg  Desktop    Downloads     httpd-2.4.25.tar.bz2  Music  Pictures  Templates  Videos
bin              Documents  httpd-2.4.25  initial-setup-ks.cfg  part   Public    user.txt
[root@centos7 ~]# pwd
/root
[root@centos7 ~]# who
root     :0           2017-07-01 15:02 (:0)
root     pts/0        2017-07-01 15:03 (192.168.239.1)
root     pts/2        2017-07-01 15:04 (192.168.239.1)
[root@centos7 ~]# blkid
/dev/sda1: UUID="dfe31250-40b8-4eaf-bf35-f462946a56e4" TYPE="xfs" 
/dev/sda2: UUID="f86bb45c-c257-4f7c-ae3c-fa72b50f277c" TYPE="xfs" 
/dev/sda3: UUID="47a6bd61-66c5-4ddc-92fe-e2325e613aee" TYPE="swap" 
/dev/sda5: UUID="f3824e25-f0da-4699-9607-f50ec1795e2d" TYPE="xfs" 
/dev/sr0: UUID="2016-12-05-13-52-39-00" LABEL="CentOS 7 x86_64" TYPE="iso9660" PTTYPE="dos" 
切换到后台停止后先前  敲过得命令执行后显示到屏幕上
[root@centos7 ~]# ps axu
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.1  0.3 193628  6732 ?        Ss   15:01   0:01 /usr/lib/systemd/systemd --switched-ro
root          2  0.0  0.0      0     0 ?        S    15:01   0:00 [kthreadd]
root          3  0.0  0.0      0     0 ?        S    15:01   0:00 [ksoftirqd/0]
root          5  0.0  0.0      0     0 ?        S<   15:01   0:00 [kworker/0:0H]
root          6  0.0  0.0      0     0 ?        S    15:01   0:00 [kworker/u256:0]
root          7  0.0  0.0      0     0 ?        S    15:01   0:00 [migration/0]
root          8  0.0  0.0      0     0 ?        S    15:01   0:00 [rcu_bh]
root          9  0.0  0.0      0     0 ?        R    15:01   0:00 [rcu_sched]
root         10  0.0  0.0      0     0 ?        S    15:01   0:00 [watchdog/0]
###查看运行程序进程状态信号
[root@centos7 ~]# jobs
[1]+  Stopped                 ping 127.1
[root@centos7 ~]# kill -18 3368
[root@centos7 ~]# 64 bytes from 127.0.0.1: icmp_seq=69 ttl=64 time=0.044 ms
64 bytes from 127.0.0.1: icmp_seq=70 ttl=64 time=0.051 ms
64 bytes from 127.0.0.1: icmp_seq=71 ttl=64 time=0.051 ms
###kill -18 
后台运行
后台运行,可以输入命令,查看命令结果
kill -22
[root@centos7 ~]# kill -22 3368

64 bytes from 127.0.0.1: icmp_seq=739 ttl=64 time=0.059 ms
64 bytes from 127.0.0.1: icmp_seq=740 ttl=64 time=0.052 ms
[1]+  Stopped                 ping 127.1
#ps axu
root       3368  0.0  0.0 127912  1224 pts/0    T    15:20   0:00 ping 127.1

fg 1 从后台调到前台,不管休眠还是运行
bg 1 将后台休眠调到后台运行
cmd+ & 后台运行
前台运行时不能在当前界面输入命令执行,用快捷键ctrl+z切换到后台暂停(休眠)界面再输入bg 1就可以后运行了,输入fg 1 调回前台运行。

###前台执行断开网络(断开端口)命令不在执行
###后台执行断开网络(断开端口)命令不在执行
###开启screen会话界面可以后台运行
#yum -y install screen
#screen
#ping 127.1
[root@centos7 ~]# pstree -p
├─sshd(993)─┬─sshd(2990)───bash(2994)───pstree(4224)
            └─sshd(3085)───bash(3089)───screen(4176)───screen(4177)───bash(4178)───ping(4213+
断开网络后
[root@centos7 ~]# ps axu|grep ping
root       4213  0.0  0.0 127912  1228 pts/1    S+   16:12   0:00 ping 127.1
root       4438  0.0  0.0 112648   964 pts/0    S+   16:23   0:00 grep --color=auto ping
[root@centos7 ~]# pidof ping
4213
[root@centos7 ~]# pstree -p
├─screen(4177)───bash(4178)───ping(4213)
├─smartd(599)
├─sshd(993)─┬─sshd(2990)───bash(2994)───pstree(4381)
                        └─sshd(4275)───bash(4279)
根ssh服务没关系了。后台还在运行中
恢复screen 的端口
[root@centos7 ~]# screen -ls 
There is a screen on:
        4177.pts-2.centos7      (Detached)
1 Socket in /var/run/screen/S-root.

[root@centos7 ~]# screen -r
nohup ping 127.1& 
[root@centos7 ~]# nohup ping 127.1 &
[1] 4710
[root@centos7 ~]# nohup: ignoring input and appending output to ‘nohup.out’
[root@centos7 ~]# tail -f nohup.out
64 bytes from 127.0.0.1: icmp_seq=263 ttl=64 time=0.051 ms
64 bytes from 127.0.0.1: icmp_seq=264 ttl=64 time=0.062 ms
64 bytes from 127.0.0.1: icmp_seq=265 ttl=64 time=0.049 ms
64 bytes from 127.0.0.1: icmp_seq=266 ttl=64 time=0.047 ms
64 bytes from 127.0.0.1: icmp_seq=267 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=268 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=269 ttl=64 time=0.049 ms
不断地输出到nohup.out 文件里
[root@centos7 ~]# nohup ping 127.1 &>/dev/null &
[3] 4912
#last 查看日志
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,233评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,013评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,030评论 0 241
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,827评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,221评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,542评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,814评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,513评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,225评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,497评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,998评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,342评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,986评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,812评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,560评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,461评论 2 266

推荐阅读更多精彩内容

  • 进程相关概念 内核的功能 进程管理、文件系统、网络功能、内存管理、驱动程序、安全功能等。 process 进程,正...
    夹克K阅读 937评论 0 1
  • 1.进程概念 (1)内核的功用: (2)进程: 运行中的程序的一个副本,是被载入内存的一个指令集合 (3)进程ID...
    尛尛大尹阅读 393评论 0 0
  • Linux进程查看及管理的工具:pstree,ps,pidof,pgrep,top,htop,glance,pma...
    JevonWei阅读 296评论 0 1
  • 进程概念 内核的功用:进程管理、文件系统、网络功能、内存管理、驱动程序、 安全功能等 Process:运行中的程序...
    JevonWei阅读 494评论 0 0
  • Linux进程管理原理 Linux的进程管理,就是对硬件各资源进行分配、调度、销毁等工作,其主要部件的管理为:CP...
    魏镇坪阅读 1,176评论 0 6