Sponsored Content
Top Forums Shell Programming and Scripting find the Root ID from the processes Post 302275551 by tonan on Sunday 11th of January 2009 04:51:05 AM
Old 01-11-2009
find the Root ID from the processes

Hi Friends,

The problem has a simple solution but i am not able to do that, need your help

dmadmin 9558 9511 0 Jan 02 ? 0:00 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil
dmadmin 9552 9511 0 Jan 02 ? 11:27 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil
dmadmin 9846 9511 0 Jan 02 ? 1:57 ./dm_agent_exec -docbase_name secm1.secm1kandocus02 -docbase_owner dmadmin -sle
dmadmin 9511 1 0 Jan 02 ? 2:13 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil dmadmin 9847 9511 0 Jan 02 ? 1:13 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil
dmadmin 9556 9511 0 Jan 02 ? 0:00 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil
dmadmin 9554 9511 0 Jan 02 ? 0:00 ./documentum -docbase_name secm1 -security acl -otrace_authentication -init_fil


As you can see a set of processes, the root process is the "dmadmin 9511 1 "
The only problem is how can i filter it out in my script. I am not very good in awk, can you guys help, a simple grep is looking up for everything which has 1 in it. I just need the line which has "9511 1 ". Basically need to filter out this line which has the Root PID.


After that i can use the awk to print the pid number.
thanks
 

10 More Discussions You Might Find Interesting

1. Programming

C program to kill root processes

Hello, First let me start by saying I have searched the forum and read all the SUID stuff but it is not in the neighborhood I am looking for. Here is the problem. We want to grant a non super-user permission to kill root processes but only if the process matches certain criteria. ... (8 Replies)
Discussion started by: TioTony
8 Replies

2. Solaris

How to find number of processes ?

Hi , I need to count all processes contains the pattren "FND" For Example: I was reteriving the details of all processes related to "FND" by this command $ ps -ef | grep FND but now I just wanna count them . Regards Adel (2 Replies)
Discussion started by: ArabOracle.com
2 Replies

3. UNIX for Advanced & Expert Users

find my tree of processes

Hi. I am logging into a remote unix/linux server (of any kind - aix, hpux, linux...) I would like to run a shell command that will return me the list of PIDs that relate to my tree. I need to get the PID of my father, and my self. I know that my SSHD process openes a BASH process. need both... (2 Replies)
Discussion started by: yamsin789
2 Replies

4. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

5. UNIX for Dummies Questions & Answers

If user has own crontab, results in accumulation of root CRON processes

Hello, I seem to be having a problem with accumulation of root CRON jobs occuring when I have a user's cron job(s) running. Here is an example of a user's crontab file: */1 * * * * echo "hello" > /dev/nullps aux|grep CRON root 14333 0.0 0.0 91236 2172 ? S ... (12 Replies)
Discussion started by: Narnie
12 Replies

6. Shell Programming and Scripting

what is the find command to find exact dir from the root

I want to find a dir called STOP from the root.so what is the find command. Thanks & Regards Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies

7. UNIX for Dummies Questions & Answers

What are these different tty processes(tty1,tty2..) running as root mentioned n the list below.

Hi, I need your help to understand about different processes(tty1,tty2,tty3...) running as root as shown below .What exactly these processes do? root@bisu-desktop:~# ps -eaf | grep -e tty -e UID UID PID PPID C STIME TTY TIME CMD root 761 1 0 10:30 tty5 ... (4 Replies)
Discussion started by: crazybisu
4 Replies

8. Shell Programming and Scripting

Find users with root UID or GID or root home

I need to list users in /etc/passwd with root's GID or UID or /root as home directory If we have these entries in /etc/passwd root:x:0:0:root:/root:/bin/bash rootgooduser1:x:100:100::/home/gooduser1:/bin/bash baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies

9. UNIX for Dummies Questions & Answers

How do I find the number of processes running on root?

Is there a certain man command I'm missing here? I searched in ps but I couldn't find something that would give me the number of processes running on root. I only want to see the number of processes, not the processes itself. (2 Replies)
Discussion started by: l3monz
2 Replies

10. AIX

Kill multiple processes ran by root

Hi all, I have about 5-6 daemons specific to my application running in the background. I am trying to write a script to stop them. Usually, I run them as a non-root ID, which is fine. But for some reason the client insists on using root. I do have sudo. I just tried something like this ... (4 Replies)
Discussion started by: jeffs42885
4 Replies
asadmin-create-acl(1AS) 					   User Commands					   asadmin-create-acl(1AS)

NAME
create-acl - adds a new access control list file for the named instance SYNOPSIS
create-acl --user admin_user[--password admin_password][--host localhost] [--port 4848][--passwordfile filename][--secure|-s][--instance instance_name] --aclfile filename acl_ID Gets the access control lists associated with the named server instance. OPTIONS
--user administrative user associated for the instance. --password administrative password corresponding to the administrative user. --host host name of the machine hosting the administrative instance. --port administrative port number associated with the administrative host. --secure indicates communication with the administrative instance in secured mode. --passwordfile file containing passwords appropriate for the command (e.g., administrative instance). --instance name of the instance. --aclfile name of the default acl file. OPERANDS
acl_ID internal name for the ACL file listing. This ID is used in a virtual server element to define the ACL file used by the virtual server. Example 1: Using create-acl asadmin> create-acl --user admin --password adminadmin --host fuyako --port 7070 --instance server1 --aclfile "/export/sample_acl_file.scl" sampleACL Created ACL with id=sampleACL Where: sampleACL is the name of the ACL created. EXIT STATUS
0 command executed successfully 1 error in executing the command INTERFACE EQUIVALENT
Access Control List page asadmin-delete-acl(1AS), asadmin-list-acl(1AS) J2EE 1.4 SDK March 2004 asadmin-create-acl(1AS)
All times are GMT -4. The time now is 10:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy