Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Process and its initiator's IP Post 29992 by Perderabo on Tuesday 15th of October 2002 08:37:43 AM
Old 10-15-2002
You should be giving each user a unique id which is used to login to your system. This id would then appear in the UID field of your "ps" listing. Then you would know the user who started the process and if you really cared which workstation he used to start the process you could just ask him. But this won't work if you let many people log on as "oracle" or something.

If there is a value like "pts/23" in the TTY field, you can try "ps -ft pts/23" and get all the processes using that tty.

The start time of the process (STIME) may be a clue. You can see who was logged on at that time by checking your wtmp file. (who /var/adm/wtmp)

You can look at the PPID field to get the parent. And get the parent of that and so on all the way to pid 1. Ignore pid 1 and look at the process whose parent is 1. If this is inetd, look at the next process in the chain. If this is something like xterm or telnetd, it will have a connection to a remote system. You can use "lsof -p" to see that connection.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to subtract 2 hours from 'date' in shell ( /bin/sh ) script ?

I write a sh script that zip and copy to tape all files that older then 2 hours. 1. The way I choose is - touch a file with "now - 2 hours", then use fine with '! -newer' 2. Do you have any other idea to do it ? tnx. (1 Reply)
Discussion started by: yairon
1 Replies

2. Programming

i can't use 'make' in my computer?

I need to compile a file,but 'make' does not work.please tell me how to use it or need which tools? (3 Replies)
Discussion started by: dsun5
3 Replies

3. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies

4. Filesystems, Disks and Memory

HELP! The '/var/adm/message' file increase every few seconds???

Hi, guys, I have a big problem. I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It soon becomes a large file. I wander if there are some mistakes configuring the workstation. the /var/adm/message is as follow: ... (1 Reply)
Discussion started by: cloudsmell
1 Replies

5. UNIX for Dummies Questions & Answers

HELP! The '/var/adm/message' file increase every few seconds???

Hi, guys, I have a big problem. I've got a sun solaris 4.1.4 workstation, and the /var/adm/message file will add one row every few seconds. It becomes a large file in a short time. I wander if there are some mistakes configuring the workstation. the /var/adm/message is as follow: ... (3 Replies)
Discussion started by: cloudsmell
3 Replies

6. UNIX for Dummies Questions & Answers

quoting echo 'it's friday'

echo 'it's friday' why appear the > (3 Replies)
Discussion started by: yls177
3 Replies

7. IP Networking

BELKIN 'F5D5020' 16bit PCMCIA - FreeBSD HOWTO

Hey all, I've bought a few bits from Belkin who seem quite happy to support FreeBSD! Last time I bought a UPS from them and it's still going well :D I saw this on their website that the 16bit PCMCIA card was supported under FreeBSD: http://www.belkin.com/network/F5D5020.html I went to my... (0 Replies)
Discussion started by: WIntellect
0 Replies

8. Email Antispam Techniques and Email Filtering

Procmail recipe: blocking 'unsubscribe and opt-out' messages....

Here is a crude procmail recipe that I quickly created (NOT a procmail recipe expert, btw) that has been catching lots of spam (current second after the charset_spam recipe posted earlier): :0B * .*If.you.do.not.wish.to.receive...* more_spam :0B * You.requested.to.receive.this.mailing... (0 Replies)
Discussion started by: Neo
0 Replies

9. UNIX for Advanced & Expert Users

How to remove a file with a leading dash '-' in it's name?

Somehow someone created a file named '-ov' in the root directory. Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies

10. Shell Programming and Scripting

What are the differences between 'bash' and 'sh'

Hopefully this doesn't come off as too much of a "newbie" question or a flamebait. But I have recently begun working with a Sun Solaris box after having spent the past five years working with RedHat. From what i can tell, thing look fairly similar and the 'man' command is some help. But I've... (7 Replies)
Discussion started by: deckard
7 Replies
BOS_STATUS(8)						       AFS Command Reference						     BOS_STATUS(8)

NAME
bos_status - Displays the status of server processes SYNOPSIS
bos status -server <machine name> [-instance <server process name>+] [-long] [-cell <cell name>] [-noauth] [-localauth] [-help] bos stat -s <machine name> [-i <server process name>+] [-lon] [-c <cell name>] [-n] [-loc] [-h] DESCRIPTION
The bos status command reports the status of processes on the server machine named by the -server argument, either o All of the AFS server processes listed in the /etc/openafs/BosConfig file o Only these processes named by the -instance argument OPTIONS
-server <machine name> Indicates the server machine for which to report server process status. Identify the machine by IP address or its host name (either fully-qualified or abbreviated unambiguously). For details, see bos(8). -instance Names each process for which to report status. Use the process name assigned with the -instance argument to the bos command. The output from the bos status command lists the names. -long Produces more detailed status information. -cell <cell name> Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8). -noauth Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see bos(8). -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see bos(8). -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output for a process includes at least one line, which reports one of the following as the process's current status: o "currently running normally". The process's status flag in the BosConfig file is "Run". For cron entries, this message indicates only that the command is scheduled to run, not necessarily that it was executing when the bos status command was issued. o "disabled". The process is not running, and its BosConfig status flag is "NotRun". o "temporarily disabled". The process is not running although its status flag in the BosConfig file is "Run". Either an administrator used the bos shutdown command to stop it, or the o BOS Server stopped trying to restart it after numerous failed attempts. In the second case, the auxiliary message is "stopped for too many errors". o "temporarily enabled". The process is running although its status flag in the BosConfig file is "NotRun". An administrator has used the bos startup command to start it. If one of the following special circumstances applies to the process, the indicated message appears in its entry: o "has core file". The process failed and created a core file in the /var/log/openafs directory. If the BOS Server was able to restart the process after the failure, the primary status is "currently running normally". o "stopped for too many errors". The reason for the primary status "temporarily disabled" is that the BOS Server's attempts to restart the process all failed. The entry for the fs process always includes a second line to report the process's "Auxiliary status", which is one of the following: o "file server running". The File Server and Volume Server components of the File Server process are running normally. o "salvaging file system". The Salvager is running, so the File Server and Volume Server are temporarily disabled. The BOS Server restarts them as soon as the Salvager is finished. The entry for a cron process includes an "Auxiliary status" that reports when the command will next execute. If the -long flag is used, each entry includes the following additional information: o The process's type ("simple", "fs", or "cron"). o The day and time the process last started or restarted. o The number of "proc starts", which is how many times the BOS Server has started or restarted the process since it started itself. o The "Last exit" time when the process (or one of the component processes in the fs process) last terminated. This line does not appear if the process has not terminated since the BOS Server started. o The "Last error exit" time when the process (or one of the component processes in the fs process) last failed due to an error. A further explanation such as "due to shutdown request" sometimes appears. This line does not appear if the process has not failed since the BOS Server started. o Each command that the BOS Server invokes to start the process, as specified by the -cmd argument to the bos create command. o The pathname of the notifier program that the BOS Server invokes when the process terminates (if any), as specified by the -notifier argument to the bos create command. If the -long flag is provided and the BOS Server discovers that the mode bits on files and subdirectories in the local /usr/afs directory differ from the expected values, it prints the following warning message: Bosserver reports inappropriate access on server directories The following chart summarizes the expected mode bit settings. A question mark indicates that the BOS Server does not check that bit. EXAMPLES
The following example command displays the status of processes on the machine fs3.abc.com: % bos status fs3.abc.com Instance buserver, currently running normally. Instance kaserver, currently running normally. Instance ptserver, currently running normally. Instance vlserver, currently running normally. Instance fs, has core file, currently running normally. Auxiliary status is: file server running. Instance upserver, currently running normally. Instance runntp, currently running normally. The following example command displays a detailed status report for the fs and ptserver processes on the machine fs1.abc.com. % bos status -server fs1.abc.com -instance fs ptserver -long Instance fs, (type is fs), currently running normally. Auxiliary status is: file server running. Process last started at Wed Jan 7 5:34:49 1998 (3 proc starts) Last exit at Wed Jan 7 5:34:49 1998 Last error exit at Wed Jan 7 5:34:49 1998, due to shutdown request Command 1 is '/usr/lib/openafs/fileserver' Command 2 is '/usr/lib/openafs/volserver' Command 3 is '/usr/lib/openafs/salvager' Instance ptserver, (type is simple) currently running normally. Process last started at Tue Jan 6 8:29:19 1998 (1 proc starts) Command 1 is '/usr/lib/openafs/ptserver' PRIVILEGE REQUIRED
None SEE ALSO
BosConfig(5), KeyFile(5), bos(8), bos_create(8), bos_shutdown(8), bos_startup(8), bos_status(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BOS_STATUS(8)
All times are GMT -4. The time now is 10:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy