introduction

Knowing the Process, it is the very basic thing of all.

Handy Command

script
1
2
3
4
5
6
7
8
1. ps
2. kill
3. pgrep # get process name and return pid
4. top # monitor
5. jobs # show the table that been stopped by Contrl+Z
6. nice -n -20 cmd # run cmd at it's highest priority
7. renice -n priority -p pid # reset the nice of process
8. lsof | grep filename # check which process hold this file

/proc/ filesystem Explanation

  1. fd
    how many file descriptor has been opened by a process

  2. maps
    what is the mem map of process

  3. status
    check the process state: Sleeping / Running / Stopped / Zombie

  4. cwd
    The link the process currently is operating from

  5. cmd
    the current cmd process is executing

  6. cmdline
    how the process is called

  7. environ
    environment variable