进程命令

1 进程基本概述:
进程是也启动的可执行的运用程序

-bash: q: command not found
[root@localhost ~]# mount /dev/cdrom /mnt/
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@localhost ~]# rpm -vih /mnt/BaseOS/Packages/ps
error: open of /mnt/BaseOS/Packages/ps failed: No such file or directory


[root@localhost ~]# rpm -vih /mnt/BaseOS/Packages/ps
psacct-6.6.3-4.el8.x86_64.rpm  psmisc-23.1-4.el8.x86_64.rpm
ps_mem-3.6-6.el8.noarch.rpm    
[root@localhost ~]# rpm -vih /mnt/BaseOS/Packages/psmisc-23.1-4.el8.x86_64.rpm 
warning: /mnt/BaseOS/Packages/psmisc-23.1-4.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          
################################# [100%]
Updating / installing...
   1:psmisc-23.1-4.el8                #                                 (  6%)
################################# [100%]

[root@localhost~]# procs
-bash: procs: command not found
[root@localhost ~]# procs r
-bash: procs: command not found
[root@localhost ~]# memory
-bash: memory: command not found
[root@localhost~]# 


[root@localhost~]# ps -ef|grep sshd
root        907      1  0 17:21 ?        00:00:00 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc -oMACs=hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 -oGSSAPIKexAlgorithms=gss-gex-sha1-,gss-group14-sha1- -oKexAlgorithms=curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oPubkeyAcceptedKeyTypes=rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oCASignatureAlgorithms=rsa-sha2-256,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,rsa-sha2-512,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa
root       1593    907  0 17:22 ?        00:00:00 sshd: root [priv]
root       1608   1593  0 17:22 ?        00:00:00 sshd: root@pts/0
root       1973    907  0 20:08 ?        00:00:00 sshd: root [priv]
root       1977   1973  0 20:08 ?        00:00:00 sshd: root@pts/1
root       2013   1978  0 20:14 pts/1    00:00:00 grep --color=auto sshd
[root@localhost ~]# pidof sshd
1977 19

root@localhost ~]# ps -elf|head
F S UID          PID    PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
4 S root           1       0  0  80   0 - 44758 do_epo 22:04 ?        00:00:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 17
1 S root           2       0  0  80   0 -     0 -      22:04 ?        00:00:00 [kthreadd]
1 I root           3       2  0  60 -20 -     0 -      22:04 ?        00:00:00 [rcu_gp]
1 I root           4       2  0  60 -20 -     0 -      22:04 ?        00:00:00 [rcu_par_gp]
1 I root           6       2  0  60 -20 -     0 -      22:04 ?        00:00:00 [kworker/0:0H-kblockd]
1 I root           8       2  0  60 -20 -     0 -      22:04 ?        00:00:00 [mm_percpu_wq]
1 S root           9       2  0  80   0 -     0 -      22:04 ?        00:00:00 [ksoftirqd/0]
1 R root          10       2  0  80   0 -     0 -      22:04 ?        00:00:00 [rcu_sched]
1 S root          11       2  0 -40   - -     0 -      22:04 ?        00:00:00 


[migration/0]
[root@localhost ~]#
[root@localhost ~]# ps -1
    PID TTY      STAT   TIME COMMAND
      1 ?        Ss     0:02 /usr/lib/systemd/systemd --
[root@localhost ~]# ps -e
出来的内容太多就复制了命令,上面那个杠1打错了


[root@localhost ~]# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.6 179032 13476 ?        Ss   Nov03   0:02 /usr/lib/systemd/systemd --switched-root --sy
[root@localhost ~]# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 Nov03 ?        00:00:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 17
root           2       0  0 Nov03 ?        00:00:00 [kthreadd]
root           3       2  0 Nov03 ?        00:00:00 [rcu_gp]
root           4       2  0 Nov03 ?        00:00:00 [rcu_par_gp]
就截图了一点点,内容舒适有点多



[root@localhost ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 1471848   3496 313692    0    0    25    17   67  127  0  1 99  0  0
[root@localhost ~]# 
si(物理内存有多少页面换进swap) 
so (从swap有多少swap有多少页面换进物理内存,也既数据离开swap的数据速度)
bi  bo  多的话(读的快)(写的快)
cs (上下文切换的速度)数值大的话表示CPU不够用了
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值