- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to list currently running batch jobs
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
01-09-2003 11:44 AM
01-09-2003 11:44 AM
eg. Scriptfile testit:
---
while true
do
sleep 77
done
---
Run script with:
batch
at -l does not list running job. Is there a way to list it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 02:12 AM
01-10-2003 02:12 AM
Re: How to list currently running batch jobs
I think the only thing you can do is extract and process these kind of entries from /var/adm/cron/log:
Start:
> CMD: 1042193129.b
> franks 8815 b Fri Jan 10 11:05:29 MET 2003
[...]
End:
< franks 8815 b Fri Jan 10 11:08:02 MET 2003
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 02:42 AM
01-10-2003 02:42 AM
Re: How to list currently running batch jobs
at -l -qb
This tells is to use queue b, which should be those submitted via batch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 02:49 AM
01-10-2003 02:49 AM
Re: How to list currently running batch jobs
Try this.
#ps -ef | grep sleep
will show you whether your job is running or not.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 03:22 AM
01-10-2003 03:22 AM
Re: How to list currently running batch jobs
I'm in mind with Frank. I found following documentation:
--- snip ---
Going through the source for at and cron and also looking at the manuals I found out the at jobs are place in /usr/spool/cron/atjobs (cronjobs for cron). Then cron monitors the entries and executes the jobs at appropriate time. The user can look at /usr/lib/cron/log file to monitor the log file and get process IDs. The log file keeps growing until the system is rebooted.
--- snap ---
Regards ...
Armin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 03:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 04:00 AM
01-10-2003 04:00 AM
Re: How to list currently running batch jobs
grab the pid for cron and do a ps -ef for that pid which will show the processes that have been spawned by cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 04:42 AM
01-10-2003 04:42 AM
Re: How to list currently running batch jobs
From /sbin/init.d/cron
'stop')
#
# Determine PID of process(es) to stop
#
pid=`ps -el | awk '( ($NF ~ /cron/) && ($4 != mypid) && ($5 != mypid) ){ print $4 }' mypid=$$ `
if [ "X$pid" != "X" ]; then
if kill $pid; then
echo "cron stopped"
else
set_return
echo "Unable to stop cron"
fi
fi
;;
A better solution could be:
ps -fg $pid will list all jobs started by any job started by cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 04:47 AM
01-10-2003 04:47 AM
Re: How to list currently running batch jobs
ps -fg `ps -el | awk '( ($NF ~ /cron/) && ($4 != mypid) && ($5 !=mypid) ){ print $4 }' mypid=$$ `
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 05:08 AM
01-10-2003 05:08 AM
Re: How to list currently running batch jobs
pid=`ps .....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 05:13 AM
01-10-2003 05:13 AM
Re: How to list currently running batch jobs
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 05:19 AM
01-10-2003 05:19 AM
Re: How to list currently running batch jobs
1- The system check it this way.
2- what an an amazing syntax. Today is a good day too to learn somthing more.