文档介绍:V进程行为观察>实验报告题目:进程行为观察1、实验目的通过本实验了解并掌握Linux主要的进程管理命令。2、实验内容与步骤在Linux下,分别用snice、skill、top等命令和/proc中的有关目录、文件观察系统中进程运行情况和CPU工作情况。Linuxsnice命令:功能作用:用于降低进程的优先级,而不是停止进程位置:/usr/bin/snice格式用法:snice[newpriority][options]process主要参数:-f快速模式/没有完成-i互动模式/每个动作将要被确认-v详细输出/列出所选择程序的资讯-w智能警告讯息/没有完成-n没有动作/显示程序代号参数:选择程序的规则可以是,终端机代号,使用者名称,程序代号,命令名称。-t终端机代号-u使用者名称-P程序代号-C命令名称可使用的讯号Usage:snice(neupriority][options]<expression>Options:—fast—interactiue■一1isl—table―no-action・・uerbose—warningsfastnode(notinplenented)interactiuelistallsiyiM1ilanes1istallsignalnanesinanicetablenoactionexplainwhatisbeingdoneenablewarnings(notinplenented)Expressioncanbe:terminal,user,nand•Theoptionsbelounaybeusedtoensurecorrectinterpretation.-c>—comnand<connand>-p,■-pid<pid>—tty<tty>■-user<usernane>expressionexpressionexpressionexpressionisaconnandnaneisaprocessidnumberisaterminalisausernane-h,--help displaythishelpandexit-U,—uersionoutputuersioninfornationandexitThedefaultpriorityis(snice..•)Prioritynumbersrangefron(slowest)to-20(fastest).(l).Linuxskill命令:Linuxskill命令送个讯号给正在执行的程序,预设的讯息为TERM(中断),较常使用的讯息为HUP、INT、KILL、STOP、CONT和0。讯息有三种写法:分别为-9、-SIGKILL、-KILL,可以使用-1或-L已列出可使用的讯息。使用权限:所有使用者。语法:skill[signaltosend][options]选择程序的规则一般参数:-f快速模式/尚未完成-i互动模式/每个动作将要被确认-v详细输出/列出所选择程序的资讯-w智能警告讯息/尚未完成-n没有动作/显示程序代号参数:选择程序的规则可以是:终端机代号、使用者名称、程序代号、命令名称。-t终端机代号(tty或pty)-u使用者名称-p程序代号(pid)-c命令名称可使用的讯号[rootuser91oca1host skillUsage:skill(signal)(options]<expression>Options:—fast--interactiue—list■-table■-no-action—uerbose—uarningsfastnode(notinplenented)interactiue1istallsignal1istal1signalnoactionexplainwhatisenableuarningsnanesnanesinanicetablebeingdone(notinplenented)Expressioncanbe:Theoptionsbelownaybe-c,■-mAnd>-P,—pid<pid>■-tty<tty>-u,——user<usernane>terminal/user>-h,--help displaythishelpandexit-U,■--Lto1istauail