- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Job execution through Xming
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
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
тАО01-18-2008 01:52 AM
тАО01-18-2008 01:52 AM
Every evening I run few shell scripts on HP-UX Production Box, One shell script takes about one hour to complete and does some DB updation and application processing etc. The shell scripts are getting launched from prompt and not through cron or any scheduler as they require some manual inputs during execution.
I was thinking IF these shell scripts could be launched from Xming or any other xwindows tool instead of a normal emulator like putty or telnet etc. Will that benefit me incase network wire gets unplugged or by mistake I close putty window etc. I mean, will there be any benefit by running shells from Xming type of tool than running directly on production prompt? I have heard that running such things on xwindows emulator will run the job on production and accept manual input also plus during network intermittance will have no affect.
Please let me know your feedback.
Thank you
Solved! Go to Solution.
- Tags:
- Xming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2008 07:39 AM
тАО01-18-2008 07:39 AM
Re: Job execution through Xming
Now, if the reponses to the prompts are always the same, or are known in advance, then a "here-doc" or "expect" might be of some use. in that case you could prepare a script and run it w/ nohup or from cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2008 04:43 PM
тАО01-19-2008 04:43 PM
Re: Job execution through Xming
/usr/sbin/cstm<<-EOF (* EOF marks start of here-doc *)
runutil logtool (* command *)
rs (* command *)
EOF (* EOF also marks the end of here-doc *)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 08:17 PM
тАО01-20-2008 08:17 PM
Re: Job execution through Xming
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 09:16 PM
тАО01-20-2008 09:16 PM
Re: Job execution through Xming
-------------------------------------------------------------------------
echo "\nYou are about to run DB Backup Process. Continue (yes/no)? \c"
read ans
case "$ans" in
[Yy]*)
break
;;
*)
exit 0
;;
esac
$BIN/BKUP.SH -n $BIN/DB_BKUP.tar # This shell copies a .tar file to some other server
$BIN/mpro /home/bases/proddb -pf bkup.pf -p ag/dbbkup.r # Calls another non-unix source program which actually does the process and asks for UserID and password
---------------------------------------
Question:
1) How to convert yes/no part with expect or heredoc? I mean, Do I need to modify the entire scripts or I could just write a heredoc script and then call the regular scripts?
2) How will expect/heredoc manage IF the script is calling some other application source codes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2008 11:47 PM
тАО01-20-2008 11:47 PM
SolutionFor that, you'll need something like the "screen" utility:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/screen-4.0.3/
Basically, before starting the shell script, run "screen". It creates a "shell within a shell". Then run the script as normal. If the network connection fails while the script is running, the outer shell will disconnect but the inner shell that's running the script, protected by the screen utility, will remain.
After the network failure has been corrected, you can login again to the same user account, and run "screen -R" to resume controlling the script.
This is a very basic way to use the screen utility; there is a lot more functionality in it. Read the man page of the screen utility for more information.
MK