- 论坛徽章:
- 307
|
- #!/usr/bin/perl
- use strict;
- use warnings;
- local $/ = '';
- while (<DATA>){
- if (m{/bin/bash\s+\./ifstat_monitor.sh}){
- print @{[split /\n/]}[-1], "\n";
- }
- }
- __DATA__
- ps -ef |grep ifstat_monitor.sh
- root 25356 30188 0 16:42 ? 00:00:00 /bin/bash ./ifstat_monitor.sh
- root 25365 25363 0 16:42 ? 00:00:00 bash -c ps -ef |grep ifstat_monitor.sh
- root 25367 25365 0 16:42 ? 00:00:00 grep ifstat_monitor.sh
- root 30188 1 0 Aug16 ? 00:13:03 /bin/bash ./ifstat_monitor.sh
- 192.168.158.36 OK
- ps -ef |grep ifstat_monitor.sh
- root 13375 1 0 Aug16 ? 00:12:57 /bin/bash ./ifstat_monitor.sh
- root 23117 13375 0 16:42 ? 00:00:00 /bin/bash ./ifstat_monitor.sh
- root 23141 23139 0 16:42 ? 00:00:00 bash -c ps -ef |grep ifstat_monitor.sh
- root 23151 23141 0 16:42 ? 00:00:00 grep ifstat_monitor.sh
- 192.168.158.37 OK
- ps -ef |grep ifstat_monitor.sh
- root 44449 44447 0 16:42 ? 00:00:00 bash -c ps -ef |grep ifstat_monitor.sh
- root 44451 44449 0 16:42 ? 00:00:00 grep ifstat_monitor.sh
- 192.168.158.39 OK
- ps -ef |grep ifstat_monitor.sh
- root 31876 42910 0 16:43 ? 00:00:00 /bin/bash ./ifstat_monitor.sh
- root 31893 31852 0 16:43 ? 00:00:00 bash -c ps -ef |grep ifstat_monitor.sh
- root 31904 31893 0 16:43 ? 00:00:00 grep ifstat_monitor.sh
- root 42910 1 0 Aug16 ? 00:12:55 /bin/bash ./ifstat_monitor.sh
- 192.168.158.161 OK
复制代码 |
评分
-
查看全部评分
|