- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- In need of a script -
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 01:32 PM
07-14-2006 01:32 PM
Re: In need of a script -
ps -e | grep "syslogd" | grep -v "grep" | nawk '{print $1}'
If that works then use the alternate function I supplied earlier although there I missed an "awk" to "nawk" replacement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 01:52 PM
07-14-2006 01:52 PM
Re: In need of a script -
I 'm unable to access that box from home so will try it tomorrow morning.
Can you again re-explain your last post so I'm more clear when I go in to try this again tomorrow morning..the part about the alternate function if the ps -e | grep "syslogd" | grep -v "grep" | nawk '{print $1}'works.
Thank you very much for all the help you've given me this evening!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 02:24 PM
07-14-2006 02:24 PM
Re: In need of a script -
# --------------------------------------
get_syslogd_pid()
{
typeset -i PSTAT=0
typeset -i SPID=$(ps -e | grep "syslogd" | grep -v "grep" | nawk '{print $1}')
PSTAT=${?}
echo "${SPID}"
return ${PSTAT}
} # get_syslogd_pid
# -------------------------------------
Take this function and replace the existing
get_syslogd_pid() function in your existing
script. It's a Solaris equivalent and it's purpose is to capture the PID of the currently execting syslogd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2006 07:51 PM
07-14-2006 07:51 PM
Re: In need of a script -
Why do you do simple things so complicate ? 8)))
LOGF=var/log/rtrlog
BACKLOG=var/log/rtrlog.bck
MAILF=/tmp/$$
if [ -s $BACKLOGF ]; then
grep -e ":%CISCOWORKS-CampusManager -e LINK_TRUNK $BACKLOGF
else
grep -e ":%CISCOWORKS-CampusManager -e LINK_TRUNK $LOGF
fi > $MAILF
date > $BACKLOGF
tail -f $LOGF>> $BACKLOGF
if [ -s $MAILF ]; then
cat $MAILF | mailx -s subject your@address
fi
By this way you don't have any problem with the logfile.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 02:05 AM
07-17-2006 02:05 AM
Re: In need of a script -
as an addendum to the methog of getting the pid of a process, to pendant of the HP-UX
UNIX95= ps -Csyslogd -o pid=
for Solaris is
pgrep syslogd
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2006 02:06 AM
07-17-2006 02:06 AM
Re: In need of a script -
as an addendum to the method of getting the pid of a command running, the pendant of the HP-UX
UNIX95= ps -Csyslogd -o pid=
for Solaris is
pgrep syslogd
mfG Peter
- « Previous
-
- 1
- 2
- Next »