linux/Tip

ps option

efrit 2007. 5. 8. 15:54

 -o Format (Continued)
            Otherwise, multiple fields in a specified format can be displayed by the Format variable, including field descriptors. If field descriptors are used in the Format variable, it must be enclosed in double quotation marks (" "). The following table shows how field descriptors correspond to field specifiers:

            Field           Field           Default
            Descriptors     Specifiers      Headers
            %a              args            COMMAND
            %c              comm            COMMAND
            %t              etime           ELAPSED
            %G              group           GROUP
            %n              nice            NI
            %C              pcpu            %CPU
            %r              pgid            PGID
            %p              pid             PID
            %P              ppid            PPID
            %g              rgroup          RGROUP
            %u              ruser           RUSER
            %x              time            TIME
            %y              tty             TTY
            %U              user            USER
            %z              vsz             VSZ


ex>ps -efo "%u %a"|grep tms_db2