摘要: 1.要监控的程序为使用cygwin环境编译的exe可执行文件hello.exe,源码如下: #include <stdio.h> #include <unistd.h> void main(void) { while(1) { printf("hello\n"); sleep(1); } } 2.以 阅读全文
posted @ 2018-10-17 22:53 Jello 阅读(1941) 评论(0) 推荐(0)
摘要: 脚本如下: #!/bin/shTTY_LOG=tty_logTTY_LOG1=tty_log1USER_NAME=`whoami`#echo ${USER_NAME}who|grep ${USER_NAME} |awk '{print $2}' > ${TTY_LOG} LINE_NUM=`cat 阅读全文
posted @ 2018-10-17 17:05 Jello 阅读(726) 评论(0) 推荐(0)