- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get at -l to work please
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
03-03-2004 02:23 PM
03-03-2004 02:23 PM
How to get at -l to work please
Have a job running, can find it in ps -ef, but at -l returns nothing.
Question - the job number returned by at or batch - does it mean anything? Can I relate it to anything? Even if I put
exec >/tmp/stdlist.$$ 2>&1
in the start of the job, I only get a process id, not the job number in my stdlist file. I need to relat job ids to output files so I know what happened.
TIA,
jp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:55 PM
03-03-2004 02:55 PM
Re: How to get at -l to work please
at -l is only going to return the jobs which are shceduled to run and not the running jobs.
with best wishes
naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 05:18 PM
03-03-2004 05:18 PM
Re: How to get at -l to work please
Make sure you have an environment variable set to something unique to your job. For example "THISJOB=tuesday". This must be set in the shell before you issue the "at" command. Then, get your script to grep for "THISJOB=tuesday" in all the files in /var/spool/cron/atjobs. It should find one file and that will have the name of the jobnumber.
The reason this might work is that "at" creates a file with the name of the job number in /var/spool/cron/atjobs. This file contains the environment when "at" was run and the job to do. This is the file that cron runs when the time is right. I imagine that this file exists while your job is running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 06:08 PM
03-03-2004 06:08 PM
Re: How to get at -l to work please
I dont understand at issuing a job number that is not stored anywhere useful, doesnt make sense. On MPE you can SHOWJOB the number, show all jobs and see their numbers, find their stdouts by job number, find their printer outputs by job number etc. The queues are a nice touch though, like that part.
jp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 06:42 PM
03-03-2004 06:42 PM
Re: How to get at -l to work please
What i meant was at -l would return all the jobs which are sheducled to run and not the one which are currently getting executed or run in the background.
As mark has told, the at command copies all the shell variables and other umask and ulimit infomration adn the commands to be executed to a file with the same job-id in /var/spool/cron/atjobs and this file is getting executed at the scheduled time. this file gets deleted immediately after the run time and the information regarding the job-id is lost
try the -m option and it will mail the user who invoked the at job and it will contain info about the job-id
with best wishes
naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 06:59 PM
03-03-2004 06:59 PM
Re: How to get at -l to work please
to parse the cron log file /var/adm/cron/log.
this file will have 3 entries for each job that is run. The first entry will look
something like this.
> CMD: 1078386840.a
> root 16475 a Thu Mar 4 01:54:00 CST 2004
< root 16475 a Thu Mar 4 01:55:00 CST 2004
The > signs are starting messages and the
< sign is an ending message. If the cron job bombs you will also see a cc= on the ending line with the condition code. Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 08:07 PM
03-03-2004 08:07 PM
Re: How to get at -l to work please
jp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 09:01 PM
03-03-2004 09:01 PM
Re: How to get at -l to work please
Then they can do their own diagnosis.
That's what I do, and it takes a whole load of my shoulders!