HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How many jobs are in cron queues?
Operating System - HP-UX
1832924
Members
2904
Online
110048
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-20-2003 07:32 AM
08-20-2003 07:32 AM
How many jobs are in cron queues?
Does anyone have a foolproof way of determining how many jobs are in the cron queues and what those jobs are? We have a situation where some cron jobs never exit due to application error and the cron queue limit is reached (set to max of 100 in the queuedefs file).
On 11.11, most of our cron jobs take the init process as the parent instead of cron, so a count of the cron PID doesn't work (jobs on 11.0 always had cron's PID as the parent). Also, not all jobs get logged properly to the cron log so a count of started versus finished jobs in the log is not accurate either.
It would be nice to know which queue they are in as well.
Any ideas?
On 11.11, most of our cron jobs take the init process as the parent instead of cron, so a count of the cron PID doesn't work (jobs on 11.0 always had cron's PID as the parent). Also, not all jobs get logged properly to the cron log so a count of started versus finished jobs in the log is not accurate either.
It would be nice to know which queue they are in as well.
Any ideas?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 01:43 AM
12-01-2003 01:43 AM
Re: How many jobs are in cron queues?
I tested with one running cronjob (HP-UX 11i), the process-ID was 987, the job started at 15:30.
# ls -l /var/spool/cron/tmp
total 0
-rw------- 1 root sys 0 Dec 1 15:30 croutPCAa00987
# ls -l /var/spool/cron/tmp
total 0
-rw------- 1 root sys 0 Dec 1 15:30 croutPCAa00987
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 06:14 AM
12-01-2003 06:14 AM
Re: How many jobs are in cron queues?
hi,
the previous trick is not foolproof, but will give you a good estimate. Temporary files are somtimes left behind.
How about checking /var/adm/cron/log for error messages about full queues??
BTW 100 for the cron queue is rather high, so I hope you have a neat sever over there. With a large queue you risk having the same job running mutliple times simultaneously.
regards,
Thierry.
the previous trick is not foolproof, but will give you a good estimate. Temporary files are somtimes left behind.
How about checking /var/adm/cron/log for error messages about full queues??
BTW 100 for the cron queue is rather high, so I hope you have a neat sever over there. With a large queue you risk having the same job running mutliple times simultaneously.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 02:05 PM
12-02-2003 02:05 PM
Re: How many jobs are in cron queues?
The question is somewhat ambiguous. If you mean: what are the total number of entries in the submitted cron list, just count the non-empty, non-comment lines in all the cron files in /var/spool/cron/crontabs. If instead you are looking for the number of simultaneous jobs, then it will always be potentially inaccurate. For instance, dmesg - requires a fraction of a second to run so you'll likely never see it. You could run a cronjob (smiley face) to count the active jobs every minute, but the best way is to just read and map the cron logfile /var/adm/cron/log. This log provides an accurate account of each cronjob that was run, the start time, the command and the stop time. Since jobs overlap each other, you'll need a fair amount of scripting to sort this out and give a true picture of the cron load...but worth the time required to spot runaway or bad jobs.
Bill Hassell, sysadmin
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP