- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: New problem with a script well used and tested...
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-23-2001 03:28 PM
07-23-2001 03:28 PM
The script involved is initiated from another one that shuts down Omniback. That part goes okay. The script with the problem hangs. The code is:
#!/bin/sh
sleep 2
if [ -f /var/adm/logs/OBII_split.*`date "+%d"`]
then
if [ ! -f /var/adm/logs/OBII_split.`date "+%y%m%d"` ]
then
/usr/bin/rm /var/adm/logs/OBII_split.*`date "+%d"`
fi
fi
##############
It doesn't seem to get past this point, as the next line in the script creates a log file, and this doesn't occur.
We haven't run out of disk space. Set -x doesn't provide anything meaningful. No new patches have been loaded for a couple of months.
I deleted those lines of code out of the script, it then ran fine.
Why has this happened? The script definitely has changed, and has been working well for years. Is there a process limit or something similar I should be looking at? Any suggestions of what to look at next would be appreciated.
Incase this info helps, we are running HP/UX 11.0 on a K460.
Regards,
Jo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2001 03:50 PM
07-23-2001 03:50 PM
Re: New problem with a script well used and tested script....
By the way we are running OBII 3.1.
Thanks,
Jo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2001 05:21 PM
07-23-2001 05:21 PM
Re: New problem with a script well used and tested script....
if ..............
then
echo "First if statement"
if ..........
then
echo "Second if statement"
rm ........
fi
fi
Does it display either echo phrase?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2001 05:32 PM
07-23-2001 05:32 PM
Re: New problem with a script well used and tested script....
My best guess (and it's only that at this point) is that the rm is hanging because of a corrupt filesystem/directory/directory entry.
I suggest that you put an echo before the remove and then try to remove the files manually. I think the rm will hang again and you will know the trouble maker file.
Happy hunting, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2001 07:15 PM
07-23-2001 07:15 PM
SolutionAlso, to follow up on Clay's point, have you seen any strange messages in syslog when this script runs?
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2001 12:52 PM
07-24-2001 12:52 PM
Re: New problem with a script well used and tested script....
I now have things working again. The problem was with the first script and it was hanging when trying to call the second one. I've changed the way of calling the second script and all is fine.
Question is - why did it stop working - especially when the script(s) haven't changed?
Regards,
Jo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2001 12:59 PM
07-24-2001 12:59 PM
Re: New problem with a script well used and tested script....
I feel like we're missing a piece of the puzzle. Generally, a script hangs when it is waiting for input. I'm not sure that we are dealing with a hang or an abort. What was the change you made? Perhaps that might give us a clue. Are you by any chance using remsh?
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2001 01:06 PM
07-24-2001 01:06 PM
Re: New problem with a script well used and tested script....
I'm glad you got your script working!
As for the cause, something must have changed somewhere. I've run into strange problems like that before, and I have even resorted to using a find command on the whole system to find any recently modified files. Any of the binary executables changed that the scripts call? Has the kernel had a parameter change and been relinked?
There are so many things that can change, it can be tough to figure it out sometimes. If this is the only problem you have, I wouldn't worry about it too much. But if you keep seeing other things break that haven't changed, you might have to do some detective work.
Have fun!
JP