Total time for which the process has utilized CPU. All the oracle process are not started by any terminal. Hopefully it can be useful in some kind of way. Below is a pretty dirty and quick script to loop through each process that is open and grab the Size, Rss, Pss and Shared Clean/Dirty usage. If you have more than one required process, this command. If you have a newer kernel it should support /proc/pid/smaps which gives you some detailed information on each processes memory usage. As in case of grep pmon command was fired in terminal pts/2 thus it is showing that this process is started by terminal pts/2. The basic technique is to use the ps -ef grep targetprocess grep -v grep command syntax. This is the terminal from which the process was started. Ps –efo user, pid, ppid, etime, args – etime will tell for last how many days process has been running. If you want to know full year and time of a lone running process, fire the command with this option This is the start time of the process, for a long running process like in case of Oracle it will show only the date in process was started. All the Oracle processes don’t have a parent process and are thus adopted by init process, init process having pid as 1 so all the oracle processes will have ppid as 1. This id is the pid of the process because of which these process has been started. This act as the identification no of the process running in the memory. The command I used above can be re-written as the much more legible: egrep 't(a|e)st' test.The name of the user who have started the process. This saves time and generally makes the expressions easier to read. This means that it escapes these special characters by default. Extended Grep: Egrep or grep -EĮgrep was created to provide extended support for meta-characters. Notice how you have to escape the parenthesis? This is much easier to look at and understand with extended regex. This is what I can use: grep 't\(a\|e\)st' test.txt Suppose I want to search for either tast or test. Using grep requires escaping meta-characters to generate the expected behavior. This is the standard version of grep designed for searching patterns using basic regular expressions. I have created a short text file to demonstrate the differences between these grep variants. 2 Answers Sorted by: 4 Your grep filters out the relevant part of the output of ps: ps -ef head ps -ef fgrep init should get you: UID PID PPID C STIME TTY TIME CMD root 1 0 0 Feb13 00:00:01 /sbin/init have a look at man ps for an explanation of the column contents. Understanding the difference between grep, egrep and fgrep with example
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |