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
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
Thanks,
Last edited by vkumbhakarna; 04-18-2013 at 07:25 PM..
$!>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)
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)
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)
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)
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)
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)
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)
pariosd -status
NodeName ID ROLE STATE PROTECTION
---------------------------------------------------------------------------
tn320_scm10 10 ACTIVE UP No Protection
tn320_scm11 11 UNKNOWN UNKNOWN
LocalApps ... (5 Replies)
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)
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
LEARN ABOUT REDHAT
logwatch
LOGWATCH(8) User Manuals LOGWATCH(8)NAME
logwatch - system log analyzer and reporter
SYNOPSIS
logwatch [--detail level ] [--logfile log-file-group ] [--service service-name ] [--print] [--mailto address ] [--archives] [--range range
] [--debug level ] [--save file-name ] [--logdir directory ] [--hostname hostname ] [--help|--usage]
DESCRIPTION
LogWatch is a customizable, pluggable log-monitoring system. It will go through your logs for a given period of time and make a report in
the areas that you wish with the detail that you wish. Easy to use - works right out of the package on almost all systems.
OPTIONS --detail level
This is the detail level of the report. level can be high, med, low.
--logfile log-file-group
This will force LogWatch to process only the set of logfiles defined by log-file-group (i.e. messages, xferlog, ...). LogWatch will
therefore process all services that use those logfiles. This option can be specified more than once to specify multiple logfile-
groups.
--service service-name
This will force LogWatch to process only the service specified in service-name (i.e. login, pam, identd, ...). LogWatch will there-
fore also process any log-file-groups necessary to process these services. This option can be specified more than once to specify
multiple services to process. A useful service-name is All which will process all services (and logfile-groups) for which you have
filters installed.
--print
Print the results to stdout (i.e. the screen).
--mailto address
Mail the results to the email address or user specified in address.
--archives
Each log-file-group has basic logfiles (i.e. /var/log/messages) as well as archives (i.e. /var/log/messages.? or /var/log/mes-
sages.?.gz). This option will make LogWatch search through the archives in addition to the regular logfiles. The entries must
still be in the proper date range (see below) to be processed, however.
--range range
You can specify a date-range to process. This option is currently limited to only Yesterday, Today and All.
--debug level
For debugging purposes. level can range from 0 to 100. This will really clutter up your output. You probably don't want to use
this.
--save file-name
Save the output to file-name instead of displaying or mailing it.
--logdir directory
Look in directory for log files instead of the default directory.
--hostname hostname
Use hostname for the reports instead of this system's hostname. In addition, if HostLimit is set in /etc/log.d/logwatch.conf, then
only logs from this hostname will be processed (where appropriate).
--usage
Displays usage information
--help same as --usage.
FILES
/etc/log.d/logwatch.conf
Really a symlink to /etc/log.d/conf/logwatch.conf. This file sets the default values of all the above options. These defaults are
used when LogWatch is called without any parameters (i.e. from cron.daily). The file is well-documented, but the explanations above
also apply to this config file.
/etc/log.d/conf/services/*
Configuration files for the various services whose log entries LogWatch can process.
/etc/log.d/conf/logfiles/*
Configuration files for the various logfiles that the above service's log entries are stored in.
/etc/log.d/scripts/shared/*
Filters common to many services and/or logfiles.
/etc/log.d/scripts/logfiles/*
Filters specific to just particular logfiles.
/etc/log.d/scripts/services/*
Actual filter programs for the various services.
EXAMPLES
logwatch --service ftpd-xferlog --range all --detail high --print --archives
This will print out all FTP transfers that are stored in all current and archived xferlogs.
logwatch --service pam_pwdb --range yesterday --detail high --print
This will print out login information for the previous day...
MORE INFORMATION
For information on adding your own filter, please see the file HOWTO-Make-Filter which should have been included with Logwatch. If you
installed from an RPM, it is probably under /usr/share/doc/logwatch-XXX.
BUGS
The --range option is very weak... this will be fixed in the future.
AUTHOR
Kirk Bauer <kirk@kaybee.org>
http://www.kaybee.org/~kirk
ftp://ftp.kaybee.org/pub/redhat/RPMS
Linux MARCH 1998 LOGWATCH(8)