UNIX LINUX
quqtalk
这个作者很懒,什么都没留下…
展开
-
echo一个命令的进程号
processid=$(ps -C 命令名 -o pid=)echo $processid 命令名是启动的命令的名字,比如启动的命令是run.sh,那么完整的shell: processid=$(ps -C run.sh -o pid=)echo $processid原创 2010-03-01 10:00:00 · 295 阅读 · 0 评论 -
使用top命令监控某个进程,并每隔10秒输出到文件中
process=$(ps -C tibemsd64 -o pid=)while (true)doecho -------------------------------------------------------------------------- >>topfiletop -p $process -b -n 1 >>topfilesleep 10 done原创 2010-03-04 14:24:00 · 566 阅读 · 0 评论 -
vi
到本行末尾 $在光标后插入 a原创 2010-03-04 17:32:00 · 212 阅读 · 0 评论 -
LINUX在多核环境下,如果控制使用的CPU数目
进入/boot/grub修改grub.conf# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE: You have a /boot partition. This means that原创 2010-04-27 17:32:00 · 305 阅读 · 0 评论