Sponsored Content
Top Forums UNIX for Dummies Questions & Answers PID -> User (I need to know the user of a PID) Post 37779 by oombera on Saturday 28th of June 2003 06:39:29 PM
Old 06-28-2003
You mean this?
Code:
$ ps --fields="user pid tty command"

    USER    PID TT      COMMAND
userName  72966 tty10   ps.exe
userName 105867 tty10   ksh.exe

 

10 More Discussions You Might Find Interesting

1. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

2. UNIX for Advanced & Expert Users

Pid=0

What OS does not use PID=0? is it FreeBSD? (0 Replies)
Discussion started by: nmajin
0 Replies

3. UNIX for Dummies Questions & Answers

getting PID

Hi , I am trying to get the PID using the following command: $ /usr/ucb/ps -auwwwwx | grep java | grep Proceess | ptree PID or $ /usr/ucb/ps -auwwwwx | grep java | grep Proceess;ptree PID it is possible to get PID, such that I check whether any orphan process is running. solution... (0 Replies)
Discussion started by: Rakesh Bhat
0 Replies

4. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

5. Shell Programming and Scripting

KILL PID, intern should kill another PID.

Hi All, In my project i have two process runs in the back end. Once i start my project, and execute the command ps, i get below output: PID TTY TIME CMD 9086 pts/1 0:00 ksh 9241 pts/1 0:02 java 9240 pts/1 0:00 shell_script_bg java with 9241 PID is the main... (4 Replies)
Discussion started by: rkrgarlapati
4 Replies

6. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

7. UNIX for Dummies Questions & Answers

Get pid

Hello people, This question might seem to be a little naive but here it goes: I want to know the PID of a script that is running in the background. eg: There is a script called Data_Downloader.sh I am using the command: ps -ef | grep Data_Downloader.sh But I am getting the output as wrkarea... (9 Replies)
Discussion started by: Rajat
9 Replies

8. UNIX for Advanced & Expert Users

Determining if user is local-user in /etc/passwd or LDAP user

Besides doing some shell-script which loops through /etc/passwd, I was wondering if there was some command that would tell me, like an enhanced version of getent. The Operating system is Solaris 10 (recent-ish revision) using Sun DS for LDAP. (5 Replies)
Discussion started by: ckmehta
5 Replies

9. Shell Programming and Scripting

Pid=$!

Hello, I would like to know what this command means? PID=$! what does "!" stand for? (5 Replies)
Discussion started by: googlietdr
5 Replies

10. Shell Programming and Scripting

I need to save a pid of a child started with $: su <user> -c “nohup …”

Hello, I want to save pid of a child process but I get empty file. su myuser -c "nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid" This one works: nohup ./mydaemon.sh >/dev/null 2>&1 & print $! > mydaemon.pid Please help. Thank you in advance. (2 Replies)
Discussion started by: vincegata
2 Replies
sconadm(1M)						  System Administration Commands					       sconadm(1M)

NAME
sconadm - register system information SYNOPSIS
/usr/sbin/sconadm register -a [-e softwareUpdate | -E softwareUpdate] [-h hostname] [-l logfile] [-N] [-p proxy_host[:proxy_port]] [-r registration_profile] [-u username] [-x proxy_username] /usr/sbin/sconadm proxy [-l logfile] [-p proxy_host[:proxy_port]] [-r registration_profile] [-x proxy_username] DESCRIPTION
The sconadm utility is a command-line version of the Basic Registration GUI. In the first form of the command in the SYNOPSIS, sconadm uses the register subcommand to register a host with a registration server. In the second form, sconadm uses the proxy subcommand to configure all of the components for software update to use an HTTP web proxy. The parameters specified with -u, -e (or -E), -h, -p, and -x override values specified in your registration profile. A template for this profile, owned by root, with read-only permissions, is stored in /usr/lib/breg/data/RegistrationProfile.properties. See registration_pro- file(4). For the proxy subcommand, the proxy password is stored in the RegistrationProfile.properties file, available if proxy authentication is needed. Storage in the profile prevents proxy passwords from being exposed as part of a listing of processes on a system. OPTIONS
The following options are supported: -a Accept "Terms of Use and Binary Code License". Absence of this option means that you do not accept the license. -e softwareUpdate Enable client to be managed at the Sun-hosted Update Connection Service. -E softwareUpdate Disable client's ability to be managed at the Sun-hosted Update Connection Service. -h hostname Hostname of the machine you want to register. -l logfile Pathname of log file. -N Never register. -p proxy_host[:proxy_port] Proxy host name and optional proxy port number. -r registration_profile Pathname to a registration profile. -u username User name (a Sun Online Account). -x proxy_username User name on the proxy host. EXAMPLES
Unless specified otherwise, the commands below require root privileges or privileges equivalent to root. See privileges(5). Example 1 Registering a New System Assume a file registrationprofile.properties in /tmp that contains the following: userName=user123 password=abc123 hostName= subscriptionKey= portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= To register a new system using the profile above, you enter: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 2 Reregistering a System with a Different User Assume a file registrationprofile.properties in /tmp with the contents shown below. Note the changed specification for userName and pass- word. userName=newuser password=newpassword hostName= subscriptionKey= portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= To reregister a new system using the profile above, you enter the same command you entered to register the system: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 3 Reregistering a System, Adding a Sun Subscription Key Modify registrationprofile.properties as follows: userName=newuser password=newpassword hostName= subscriptionKey=abc12345678 portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= Run the command: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 4 Reregistering and Enabling Access to all Update Connection Services Modify registrationprofile.properties as follows: userName=newuser password=newpassword hostName= subscriptionKey=abc12345678 portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= Note that portalEnabled is set to false. Run the command: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties -e softwareUpdate Example 5 Never Registering To never register a system, enter: /usr/sbin/sconadm register -N Example 6 Using a Proxy Server With Proxy Authentication Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName=webcache.mycompany.com proxyPort=8080 proxyUserName=myCompanyProxyUserName proxyPassword=myCompanyProxyPassword Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties Example 7 Changing Proxy Host Settings Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName=webcache.mycompany.com proxyPort=8080 proxyUserName=myCompanyProxyUserName proxyPassword=myCompanyProxyPassword Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties Then, change the proxyHostName value by running the following command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties -p newproxy.mycompany.com After the preceding command all proxies use newproxy.mycompany.com. Example 8 Resetting a System Not to Use a Proxy Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName= proxyPort= proxyUserName= proxyPassword= Note that values for all proxy fields are null. Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties EXIT STATUS
0 Success. >0 An error occurred. FILES
/usr/lib/breg/data/RegistrationProfile.properties Registration profile template. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbrg | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
registration_profile(4), attributes(5), privileges(5) SunOS 5.11 27 Feb 2006 sconadm(1M)
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy