- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange out put from same script on different syst...
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
03-27-2003 05:22 AM
03-27-2003 05:22 AM
Strange out put from same script on different systems.
I am running a shell script on (L-Class)one Server. It is checking that whether same script is running properly or not.
command used inside the script
" echo `ps -ef|grep -v grep|grep nprparser_start.sh` "
O/P is
metrica 1601 1476 3 13:16:20 pts/0 0:00 sh -v nprparser_start.sh
metrica 26972 26719 3 16:03:13 pts/1 0:00 /usr/bin/sh ./nprparser_start.sh
When I run the same script on another m/c (K-Class),
O/P I am getting
metrica 26992 26972 0 16:03:13 pts/1 0:00 ./nprparser_start.sh ./nprparser_start.sh
metrica 26972 26719 3 16:03:13 pts/1 0:00 ./nprparser_start.sh ./nprparser_start.sh
Script is defined to run using POSIX Shell "/usr/bin/sh".
With the same environment setting on the both m/cs for user. But getting different output.
Any pointer.
Thanks in advance.
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 05:35 AM
03-27-2003 05:35 AM
Re: Strange out put from same script on different systems.
It looks like the first box is running your script from two different terminals [pts/0 and pts/1]. The first terminal invoked the script with a 'sh -v' command while the second script just used 'sh' to run it. On the second box, the script appears to have been run by invoking the script name from the command line. How are you running the scripts on each system? By command line, from another script, etc.?
Also, another way of checking to see if your script is running is to use the -C option to specify the command that is running. That option is for XPG4 only, so you have to set the UNIX95 variable, like this:
UNIX95=1 ps -C nprparser_start.sh
Which saves you a bit of processing and also you don't have to do the 'grep -v grep' craziness.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 05:36 AM
03-27-2003 05:36 AM
Re: Strange out put from same script on different systems.
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/J2656-90038/J2656-90038_top.html&con=/hpux/onlinedocs/J2656-90038/00/00/71-con.html&toc=/hpux/onlinedocs/J2656-90038/00/00/71-toc.html&searchterms=Set%20Session%20Parameters%20function&queryid=20030327-063556
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 05:42 AM
03-27-2003 05:42 AM
Re: Strange out put from same script on different systems.
Using 'ps -ef|grep token|grep -v'...syntax isn't the most rigorous way to monitor a process by name. I suspect that do to command line limitations and/or timing that you are seeing (or not seeing) the additional information.
A better approach is to do:
# UNIX95= ps -fC
This will deliver (or not) the process information for
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 05:50 AM
03-27-2003 05:50 AM
Re: Strange out put from same script on different systems.
Several scripts we had started fo fail because the command was prefixed by the full path to the shell (in our case perl) - sort of what you're seeing on your L-Class.
Col.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2003 05:59 AM
03-27-2003 05:59 AM
Re: Strange out put from same script on different systems.
Machine 2 the start time is the same and the
tty number is the same
machine 1 the ttys and start number are different
O/P is
metrica 1601 1476 3 13:16:20 pts/0 0:00 sh -v nprparser_start.sh
metrica 26972 26719 3 16:03:13 pts/1 0:00 /usr/bin/sh ./nprparser_start.sh
Thhe first script start at 13:16 the second at 16:03 and that is why it is different
There is probably a fault on this machine
Steve Steel