Untitled

Untitled

ps aux | grep [keyword] # ps aux: displays all processes of all usersps aux | head -10ps axo stat,priority,pid,pcpu,comm | head -10ps -u     # display information of processes for a specified userps -ef    # displays all the processes in the system in full detailps -eLf   # displays one line of information for every threadps -fC [command_name]pstreekill -[signal] [pid]    # force killkill -SIGKILL [pid]kill -9 [pid]           # same as aboveterm [pid]              # terminate gracefully

User and Group IDs

Priorities

ps lf    # show priority# Setting the Priority when Starting Processnice -n [nice_value_increament] /bin/[someSlowProcess]# Changing the Priority of a Runing Processrenice [nice_value_increament] [PID]renice +5 3077          # increase 5sudo renice -5 3077     # decrease 5, must in sudogenome-system-monitor   # check priority in monitor

Load Averages

w# load average (for 1 min, 5 min, 15 min), a single-CPU everagetop# Output:# 1st line: time the system has been up, users logged on, load average as `w`# 2nd line: total processes, the number of running, sleeping, stopped, and zombie# 3rd line: CPU time divided between users (us) and kernel (sy),  # and the percentage of user jobs running lower priority (ni),  # idle mode (id) should be low if the load average is high,  # the percentage of jobs waiting (wa) for I/O,  # hardware (hi) vs. software interrupts (si),  # steal time (st) is generally used with virtual machines, which has some of its idle CPU time taken for other uses# Prameters of the table  # Process Identification Number (PID)  # Process owner (USER)  # Priority (PR) and nice values (NI)  # Virtual (VIRT), physical (RES), and shared memory (SHR)  # Status (S)  # Percentage of CPU (%CPU) and memory (%MEM) used  # Execution time (TIME+)  # Command (COMMAND).# You can enter single-letter commands to change its behavior  # t: Display or hide summary information (rows 2 and 3)  # m: Display or hide memory information (rows 4 and 5)  # A: Sort the process list by top resource consumers  # r: Renice (change the priority of) a specific processes  # k: Kill a specific process  # f: Enter the top configuration screen  # o: Interactively select a new sort order in the process list  # 1: Show every single cpuvmstat -a 2 1000  # all info, every 2 sec, run 1000 timesuptime