- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting help....
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
10-05-2004 07:14 AM
10-05-2004 07:14 AM
I'm trying to write a script, that will monitor the print queue. I need a script that will check the print jobs, and any jobs that have been sitting in queue for longer than 30, the script notify me. The notification part is easy and done....checking the print queue (lpstat -i -o) is easy and done. But how can I compare the print job time to the current system time, and see if it is older than 30 minutes?
Dwyane
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 07:21 AM
10-05-2004 07:21 AM
SolutionI do it like below.
find /var/spool/lp/request ! -name ".*" -type f -mtime +3 -exec rm {} \;
Check for yorself about deleting 30Mins older files.
Hope this helps
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 07:23 AM
10-05-2004 07:23 AM
Re: Scripting help....
Submitted jobs noted in this dir and have a date/time stamp that you can use for comparison.
The files will be named by the PRTDEV name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 07:26 AM
10-05-2004 07:26 AM
Re: Scripting help....
Attached
Modify as required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2004 07:34 AM
10-05-2004 07:34 AM
Re: Scripting help....
I don't necessarily want to remove thse jobs. This is going to be a way to notify me of printers that probably need some TLCWH (Tender loving care with a hammer!). :)
Actually, we have several serially connected line printers, and Web JetAdmin doesn't have the functionality to monitor them. So, I had to get a little creative. Once I have a functioning script, I will add the opcmsg function of OVOW...
Thanks again!!! Points well deserved!
Dwyane