Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Determine uniqueness of pid to name output files Post 302796021 by vkumbhakarna on Thursday 18th of April 2013 06:19:42 PM
Old 04-18-2013
Determine uniqueness of pid to name output files

Hi,

We've a process on AIX UNIX server which is executed by multiple uses during a day. I wish to create a log file for every time the process is executed. I wish to know how unique are PID(s) on AIX UNIX servers if I were to name the log files with <date> and <PID>?

E.g. If I create my output files having the details such as
Code:
`date +%Y%m%d`_${$}_out.csv

With my limited understanding of UNIX and from what I've read on the forum https://www.unix.com/unix-advanced-expert-users/2896-obtaining-process-id-pid.html AIX system sequentially assigns a limited set of PIDs and re-utilizes them as and when processes get freed and slot is available for allocation by dispatcher.

Please suggest a suitable way to uniquely identify the process execution during the day. I am also considering adding datetime hh:mm:ss to the log name to uniquely identify the same E.g. change log file name to
Code:
 `date +%Y%m%d_%H%M%S`_${$}_out.csv

Thanks,

Last edited by vkumbhakarna; 04-18-2013 at 07:25 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I tried to get the PID on the files called PID_Server

$!>PID_FILES I try to get the PID of the last process on the files called PID_FILES. But the command stands by on the output screen. I have to tape on ENTER to get the prompt and continue . How may I simulate this action ( tape on ENTER ). thanks (1 Reply)
Discussion started by: hoang
1 Replies

2. 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

3. UNIX for Advanced & Expert Users

What are tr.pid.rotation files?

Hi! I'm facing a unique problem! When I run a program on HPUX, it runs fine but it also produces a bunch of files of the format: tr.<pid>.number the contents of these files are a bunch of numbers and I know for a fact that these files are not created by the program I'm running. Seems... (3 Replies)
Discussion started by: zackz
3 Replies

4. Shell Programming and Scripting

Output of ps + awk in a variable to get PID

Hi All, I am getting the PID of a process using its name using the following command in a script mypid=`ps aux | awk '/test5/ && !/awk/ { print $2 }'` echo PID is $mypid The problem is the PID is not getting printed. But when i run the command directly in shell, the PID got printed. ... (2 Replies)
Discussion started by: amio
2 Replies

5. Shell Programming and Scripting

output nohup file containg the PID

Hi to everybody. Is it possible to nohup a process and redirect the output to a file containing the PID? E.g. if nohup filename > out.nohup associate the PID=8074 to filename, is it possible to call the output file something like out_8074.nohup instead of out.nohup? By this way it would... (0 Replies)
Discussion started by: plsrn
0 Replies

6. UNIX for Dummies Questions & Answers

determine pid from ps -ef | grep something

Hi all, i have a script called a.sh and within a.sh it calls b.sh. when i do a ps -ef | grep a.sh, i get two sets of number user_test 4225 3250 0 10:31 pts/1 00:00:00 a.sh when i do a ps -ef | grep b.sh, i get two sets of number user_test 4269 4225 22 10:31 pts/1 00:00:45... (17 Replies)
Discussion started by: new2ss
17 Replies

7. AIX

kill -3 <PID> ... where the output file goes?

Hi all, I am generating the coredump of my JBoss, and by default it puts it in to a particular directory. i.e. JBOSS_HOME/. I would like this output file to be created, lets say in /tmp/dump/. I tried the following: kill -3 9404940>/tmp/dump/out.txt But it created... (3 Replies)
Discussion started by: haroon_a
3 Replies

8. Shell Programming and Scripting

Get Pid from a command output

pariosd -status NodeName ID ROLE STATE PROTECTION --------------------------------------------------------------------------- tn320_scm10 10 ACTIVE UP No Protection tn320_scm11 11 UNKNOWN UNKNOWN LocalApps ... (5 Replies)
Discussion started by: hariprasad123
5 Replies

9. UNIX for Dummies Questions & Answers

problem to determine all files and dir match up on 2 different unix boxes

Hi Friends I have 2 solaris boxes and I need to check certain directories (on local filesystem and mounted nfs) to make sure that they match up on both boxes and to delete or move the other mismatches to elsewhere on the local filesystem. I investigated for unix commands like rsync, and tree... (1 Reply)
Discussion started by: mpc8250
1 Replies

10. Shell Programming and Scripting

Search compare and determine duplicate files

Hi May i ask if someone know a package that will search a directory recursively and compare determine duplicate files according to each filename, date modified or any attributes that will determine its duplicity If none where should i start or what are those command in shell scripting that... (11 Replies)
Discussion started by: jao_madn
11 Replies
SAMBA(7)																  SAMBA(7)

NAME
SAMBA - A Windows SMB/CIFS fileserver for UNIX SYNOPSIS
Samba DESCRIPTION
The Samba software suite is a collection of programs that implements the Server Message Block (commonly abbreviated as SMB) protocol for UNIX systems. This protocol is sometimes also referred to as the Common Internet File System (CIFS), LanManager or NetBIOS protocol. smbd The smbd daemon provides the file and print services to SMB clients, such as Windows 95/98, Windows NT, Windows for Workgroups or LanManager. The configuration file for this daemon is described in smb.conf nmbd The nmbd daemon provides NetBIOS nameserving and browsing support. The configuration file for this daemon is described in smb.conf smbclient The smbclient program implements a simple ftp-like client. This is useful for accessing SMB shares on other compatible servers (such as Windows NT), and can also be used to allow a UNIX box to print to a printer attached to any SMB server (such as a PC running Win- dows NT). testparm The testparm utility is a simple syntax checker for Samba's smb.confconfiguration file. testprns The testprns utility supports testing printer names defined in your printcap> file used by Samba. smbstatus The smbstatus tool provides access to information about the current connections to smbd. nmblookup The nmblookup tools allows NetBIOS name queries to be made from a UNIX host. make_smbcodepage The make_smbcodepage utility provides a means of creating SMB code page definition files for your smbd server. smbpasswd The smbpasswd command is a tool for changing LanMan and Windows NT password hashes on Samba and Windows NT servers. COMPONENTS
The Samba suite is made up of several components. Each component is described in a separate manual page. It is strongly recommended that you read the documentation that comes with Samba and the manual pages of those components that you use. If the manual pages aren't clear enough then please send a patch or bug report to samba@samba.org <URL:mailto:samba@samba.org> AVAILABILITY
The Samba software suite is licensed under the GNU Public License(GPL). A copy of that license should have come with the package in the file COPYING. You are encouraged to distribute copies of the Samba suite, but please obey the terms of this license. The latest version of the Samba suite can be obtained via anonymous ftp from samba.org in the directory pub/samba/. It is also available on several mirror sites worldwide. You may also find useful information about Samba on the newsgroup comp.protocol.smb <URL:news:comp.protocols.smb> and the Samba mailing list. Details on how to join the mailing list are given in the README file that comes with Samba. If you have access to a WWW viewer (such as Netscape or Mosaic) then you will also find lots of useful information, including back issues of the Samba mailing list, at http://lists.samba.org <URL:http://lists.samba.org/>. VERSION
This man page is correct for version 2.2 of the Samba suite. CONTRIBUTIONS
If you wish to contribute to the Samba project, then I suggest you join the Samba mailing list at http://lists.samba.org <URL:http://lists.samba.org/>. If you have patches to submit or bugs to report then you may mail them directly to samba-patches@samba.org. Note, however, that due to the enormous popularity of this package the Samba Team may take some time to respond to mail. We prefer patches in diff -u format. CONTRIBUTORS
Contributors to the project are now too numerous to mention here but all deserve the thanks of all Samba users. To see a full list, look at ftp://samba.org/pub/samba/alpha/change-log <URL:ftp://samba.org/pub/samba/alpha/change-log> for the pre-CVS changes and at ftp://samba.org/pub/samba/alpha/cvs.log <URL:ftp://samba.org/pub/samba/alpha/cvs.log> for the contributors to Samba post-CVS. CVS is the Open Source source code control system used by the Samba Team to develop Samba. The project would have been unmanageable without it. In addition, several commercial organizations now help fund the Samba Team with money and equipment. For details see the Samba Web pages at http://samba.org/samba/samba-thanks.html AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter 19 November 2002 SAMBA(7)
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy