1 | my $vmStatCmd = "vmstat 1"; |
1 | my $vmStatCmd = "./fastUpdate.pl 0.2 " |
1 | for( split " ", "r b swpd free buff cache si so bi bo in cs us sy id wa" ){ |
1 | for( split " ", "memFree ethInt proc" ){ |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # user cpu usage $note = $currLine[ $fields{us} ]; sendNote( $note, 14, 12, 96 ); # conglomerate disk i/o fields to one stat $note = $currLine[ $fields{bi} ] + $currLine[ $fields{bo} ]; if( $note > 1000 ){ $note = 1000; } $note = $note/10; sendNote( $note, 8, 12, 96 ); # network throughput on eth0 $note = getNetworkStats(); sendNote( $note, 5, 12, 84 ); |
1 2 3 4 5 6 7 8 | $note = $currLine[ $fields{memFree} ]; sendNote( $note, 14, 48, 96 ); $note = $currLine[ $fields{ethInt} ]; sendNote( $note, 8, 48, 96 ); $note = $currLine[ $fields{proc} ]; sendNote( $note, 5, 48, 96 ); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |