본문 바로가기

창고/Backup_2013_0121

[UNIX] ps 명령어

반응형

현재 메모리에 올라가 실행중인 명령어를 확인할때 쓰는 ps  옵션으로 -ef 주로 쓰는데,

 

의미를 모르고 쓰는 경우가 많아서 ( 내가-_-) ;;

 

정리 해 봤습니다. 아래 내용은 man 명령어로 보면 나오는 내용입니다.

 

명령어

ps - 프로세스 상태 레포트

 

사용법

ps [-adeflPzx] [-g grplist] [-p proclist] [-R prmgrplist] [-t termlist]
    [-u uidlist] [-Z pset_list]


설명

ps 는 선택한 프로세스에 관한 정보를 보여줍니다. 선택한 프로세스에 알맞는 옵션을 설정하여, 그에 관한

자세한 정보를 확인할 수 있습니다.

 

[옵션] - (제가 자주쓰는 옵션만 나열했습니다.)

 

-e             모든 프로세스를 보여줍니다.

-f              프로세스의 상태를 보여줍니다. 정보는 user, pid, ppid, cpu, stime, tty, time, args 순입니다.

-x             명령줄 실행 옵션을 확장타입으로 보여줍니다. ( 명령줄에서 인수를 엄청길게 줄경우 모두 확인 할수 있습니다. )

 


           pid            프로세스 ID

           ppid          부모 프로세스 ID

           cpu           Processor utilization for scheduling.  The default
                          heading for this column is C.


           stime        프로세스의 시작시간, 하루가 지나면 일자로 바뀜.


           tty            The controlling terminal for the process.  The
                          default heading for this column is TT if -o is
                          specified and TTY otherwise.

 

           time          프로세스가 동작해서 지난 시간

 

           args          The command line given when the process was
                          created.  This column should be the last one
                          specified, if it is desired.  Only a subset of the
                          command line is saved by the kernel; as much of
                          the command line will be displayed as is
                          available.  The output in this column may contain
                          spaces.  The default heading for this column is
                          COMMAND if -o is specified and CMD otherwise.

 

컬럼중에 cpu 와 stime, time 은 나름 쓸모가 있더군요.. 방금 작업을 하면서도 포그라운드인데 실행되지 않는 프로세스를 cpu 컬럼을 보고 알았습니다.

 

문제점은 찾아봐야겠지만=ㅅ=''

반응형