|
主要是打算想使用这个脚本来计算一下,目前有多少个同样的进程,在执行..
比如ftp的进程的话,就知道目前有多少个连接...
好像ps 命令打出的结果,来作个数量的统计...谢谢...
- [hgkrt@linuxserver hgkrt]$ ps -aux |grep pure
- root 17742 0.0 0.0 4092 764 ? S Feb22 0:02 pure-ftpd (SERVER
- root 19638 0.0 0.1 4420 1032 ? SN 04:09 0:04 pure-ftpd (DOWNLO
- root 19769 0.0 0.1 4420 1040 ? SN 04:43 0:10 pure-ftpd (DOWNLO
- root 19772 0.0 0.1 4416 1012 ? SN 04:43 0:10 pure-ftpd (DOWNLO
- root 20005 0.0 0.0 4420 980 ? SN 07:12 0:07 pure-ftpd (DOWNLO
- root 20009 0.0 0.0 4420 980 ? SN 07:14 0:06 pure-ftpd (DOWNLO
- root 20180 0.0 0.0 4420 944 ? SN 09:54 0:03 pure-ftpd (DOWNLO
- root 20220 0.0 0.0 4420 972 ? SN 10:46 0:04 pure-ftpd (DOWNLO
- root 20252 0.0 0.0 4420 940 ? SN 11:45 0:00 pure-ftpd (DOWNLO
- root 20257 0.0 0.0 4420 980 ? RN 11:50 0:03 pure-ftpd (DOWNLO
- root 20258 0.0 0.1 4420 1028 ? SN 11:50 0:04 pure-ftpd (DOWNLO
- root 20260 0.0 0.0 4420 948 ? RN 11:51 0:03 pure-ftpd (DOWNLO
- root 20279 0.0 0.0 4420 976 ? SN 12:39 0:00 pure-ftpd (DOWNLO
- root 20280 0.0 0.1 4416 1004 ? SN 12:39 0:00 pure-ftpd (DOWNLO
- root 20291 0.0 0.1 4420 1056 ? SN 12:58 0:02 pure-ftpd (DOWNLO
- root 20302 0.0 0.1 4420 1056 ? SN 13:10 0:01 pure-ftpd (DOWNLO
- root 20318 0.0 0.0 4416 920 ? SN 13:27 0:01 pure-ftpd (DOWNLO
- root 20319 0.0 0.0 4416 952 ? SN 13:27 0:01 pure-ftpd (DOWNLO
- root 20339 0.0 0.0 4420 956 ? SN 13:46 0:00 pure-ftpd (DOWNLO
- root 20412 0.0 0.0 4416 928 ? SN 13:53 0:00 pure-ftpd (DOWNLO
- root 20448 0.0 0.0 4416 964 ? SN 14:14 0:00 pure-ftpd (DOWNLO
- root 20449 0.0 0.0 4416 956 ? SN 14:14 0:00 pure-ftpd (DOWNLO
- root 20471 0.0 0.0 4416 932 ? SN 14:27 0:00 pure-ftpd (DOWNLO
- root 20476 0.0 0.0 4416 996 ? SN 14:29 0:00 pure-ftpd (DOWNLO
- root 20481 0.0 0.0 4416 952 ? SN 14:33 0:00 pure-ftpd (DOWNLO
- root 20483 0.0 0.0 4416 948 ? SN 14:38 0:00 pure-ftpd (DOWNLO
- root 20508 0.0 0.0 4416 924 ? SN 14:57 0:00 pure-ftpd (DOWNLO
- root 20509 0.0 0.0 4416 936 ? SN 14:57 0:00 pure-ftpd (DOWNLO
- root 20513 0.0 0.1 4416 1072 ? SN 15:04 0:00 pure-ftpd (DOWNLO
- root 20515 0.0 0.1 4416 1096 ? SN 15:05 0:00 pure-ftpd (DOWNLO
- root 20517 0.0 0.1 4416 1096 ? SN 15:09 0:00 pure-ftpd (DOWNLO
- root 20518 0.0 0.1 4416 1072 ? SN 15:09 0:00 pure-ftpd (DOWNLO
- root 20519 0.0 0.1 4416 1084 ? SN 15:11 0:00 pure-ftpd (DOWNLO
- root 20523 0.0 0.1 4416 1080 ? SN 15:14 0:00 pure-ftpd (IDLE)
- root 20566 0.0 0.1 4416 1068 ? SN 15:17 0:00 pure-ftpd (DOWNLO
- hgkrt 20571 0.0 0.0 3276 628 pts/3 S 15:18 0:00 grep pure
- [hgkrt@linuxserver hgkrt]$
复制代码 |
|