- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ps: option
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
Discussions
Discussions
Forums
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
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
тАО06-09-2009 06:36 AM
тАО06-09-2009 06:36 AM
Hoping this is a simple fix not a scripting guy.. Here is the error I am getting.
# ./startwrx
Starting WRX System.
Give it some time Starting up WRX
ps: option requires an argument -- u
usage: ps [-edaxzflP] [-u ulist] [-g glist] [-p plist] [-t tlist] [-R prmgroup] [-Z psetidlist]
line
usage: kill [ -signo ] pid ...
[root:testomni:/usr2/amv/cmd]
#
Solved! Go to Solution.
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 06:40 AM
тАО06-09-2009 06:40 AM
SolutionThe script you attached says it is doing a 'ps -u ${PROJECT_NAME}....' but I do not see the ${PROJECT_NAME} defined in the first few lines of the script.
You need to get that variable defined appropriately before the script will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 06:43 AM
тАО06-09-2009 06:43 AM
Re: ps: option
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 06:44 AM
тАО06-09-2009 06:44 AM
Re: ps: option
Most notably, the variables 'PROJECT_NAME' and 'PROJECT_DIR' are never set. This cause the usage error you get.
A useful protection against chasing things like this is to begin you script like:
#!/usr/bin/ksh
set -u
...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 07:11 AM
тАО06-09-2009 07:11 AM
Re: ps: option
I have corrected this but I'm now stuck at this
# ./startwrx
Starting WRX System.
Give it some time Starting up WRX
line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 07:21 AM
тАО06-09-2009 07:21 AM
Re: ps: option
If you have support agreement with the vendor of this software, I'd strongly suggest contacting them.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 07:44 AM
тАО06-09-2009 07:44 AM
Re: ps: option
>>Since the line you said you are stuck at, is not in the script itself,
Actually, it is.
Here's the section of the script that's causing the delay....
while [ "$systat" -ne "START" ]
do
if [ "$firsttime" != "TRUE" ]; then
if [ $waittime -le 0 ]; then
echo " Unable to Start WRX System! " 1>&2
exit 1
fi
# wait for a bit
sleep $sleeptime
waittime=`expr $waittime - 1`
fi
firsttime="FALSE"
echo "gc\nf\n2\n\nq\nq\n" | ${PROJECT_DIR}/amv/bin/utdbu |
while read line
do
firstarg=`echo $line | awk '{print $1}'`
if [ "$firstarg" = "cnflng" ]; then
systat=`echo $line | awk '{print $4}'`
fi
done
done
It appears that this attempts to start whatever this is. It gets the status of the process via the 'systat=' line above. If systat is not equal to START, then it will wait and try again. Each time through the script the "waittime" is decremented by 1. So, it will run through the script '90' times, sleeping 10 seconds each time (if I am figuring correctly), so you have a potential delay of 900 seconds (15 minutes) if the system is not starting correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2009 07:45 PM
тАО06-09-2009 07:45 PM
Re: ps: option
Regards
Tarun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 03:32 AM
тАО06-10-2009 03:32 AM
Re: ps: option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2009 03:33 AM
тАО06-10-2009 03:33 AM