Solved

Solaris - check the process

Posted on 2011-09-21
6
390 Views
Last Modified: 2012-05-12
Hi,

I have a process.

I have a PID number of a specific process.

Is there any log/command where I can find out who did create this process?

Tks,
Joao
0
Comment
Question by:joaotelles
6 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 334 total points
ID: 36576130
If you do

ps -fp <PID>

where <PID> is the PID number, the owner is in the first column
0
 

Author Comment

by:joaotelles
ID: 36576281
I know how to see the owner.

What I want to check is which script created the PID and at what time.
0
 
LVL 48

Accepted Solution

by:
Tintin earned 334 total points
ID: 36576552
The 5th column of the ps output will show you when the process was started.

As for what initiated the process, it depends on what the Parent PID (PPID) is.

If the PPID (3rd column) is 1, then the process is most likely started at boot time.

If the PPID is some other number, then another process started it.

Can't remember if Solaris has pstree command.  Try doing

pstree <PID>

if there is no pstree command, you can check the parent process by doing

ps -fp <PPID>

where <PPID> is the number from the 3rd column in the initial ps output.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 166 total points
ID: 36578058
In Solaris called ptree
ptree  <PID>
0
 
LVL 9

Expert Comment

by:amolg
ID: 36580268
prstat -a
0
 

Author Closing Comment

by:joaotelles
ID: 36599596
Tks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now