LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2011, 04:32 PM   #1
AchimRS
Member
 
Registered: Mar 2005
Location: Germany
Distribution: Debian Wheezy
Posts: 42

Rep: Reputation: 0
Problems with the "at" command


Hi all experts,
after reading dozens of tutorials and man-pages the at command still don't to what it sould, maybe one can help me here...

In case I submit a job like
Code:
echo "touch test1" | at now + 1 minute
the job is queued, so with "atq" I see the job like:
Quote:
23 Sat Dec 10 23:20:00 2011 a root
and when looking inside the queued job with "at -c 23" I see a script:
Quote:
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22
SSH_CLIENT=192.168.178.30\ 60168\ 22; export SSH_CLIENT
SSH_TTY=/dev/pts/0; export SSH_TTY
USER=root; export USER
MAIL=/var/mail/root; export MAIL
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/owfs/bin; export PATH
PWD=/root; export PWD
LANG=en_US.UTF-8\"\ ; export LANG
PS1=\\[\\e[0\;32m\\]\\u@\\h:\\W\>\ \\[\\e[0m\\]; export PS1
SHLVL=1; export SHLVL
HOME=/root; export HOME
LOGNAME=root; export LOGNAME
SSH_CONNECTION=192.168.178.30\ 60168\ 192.168.178.75\ 22; export SSH_CONNECTION
cd /root || {
echo 'Execution directory inaccessible' >&2
exit 1
}
touch test1
for now, everything looks fine. Also after the time has passed, the job was done, in my case the file ~/test1 was touched - fine!
But when looking in the queue again with "atq" I see:
Quote:
23 Sat Dec 10 23:20:00 2011 = root
23 Sat Dec 10 23:20:00 2011 a root
So it looks like the job is still in the "running" queue, even after hours - a simple touch?!?!
And in case I remove the job with "atrm 23" I get an warning:
Quote:
Warning: deleting running job
In addition - and this causes a real problem for me - sometimes the at-daemon "atq" is running hours and days after the last job using a high amount of CPU. I saw this with the "top" command and because of permanent load of 40..60% CPU my processor got hot

Any idea why my jobs never finish?
What do I need to do to really stop the jobs??

Thanks
Achim
 
Old 12-10-2011, 05:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi,

What OS/distro is this happening with, what version is your "at"?


Cheers,
Tink
 
Old 12-10-2011, 05:25 PM   #3
AchimRS
Member
 
Registered: Mar 2005
Location: Germany
Distribution: Debian Wheezy
Posts: 42

Original Poster
Rep: Reputation: 0
Oh sorry, I forgot to mention that:
It's EmDebian Squeeze (a smaller/lighter build of Debian for embedded ARM).

"at" itself is version 3.1.12

thanks
Achim
 
Old 12-10-2011, 07:06 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi,

Now I'm uncertain whether to move this to our "embedded" forum or
to "debian" :} - which would you prefer?

It's certainly not in the realm of your ordinary newbie-thread; on
a desktop or "normal" server class machine I would have suggested to
use strace on the PID of your touch process, but in this case strace
probably won't be installed, or undesirable to install.



Cheers,
Tink
 
Old 12-10-2011, 08:37 PM   #5
AchimRS
Member
 
Registered: Mar 2005
Location: Germany
Distribution: Debian Wheezy
Posts: 42

Original Poster
Rep: Reputation: 0
> Now I'm uncertain whether to move this to our "embedded" forum or to "debian" :} - which would you prefer?
Oh, even if my usage is in the embedded world, I'm sure it have nothing to do with embedded, I would prefer "debian" :-)

But with your hint I tested the behavior on my Ubuntu Jaunty workstation which have "at" in version 3.1.9 installed - and it works as expected, so after the touch was done the job is removed in the "atq"
Hmmm, this really looks like a bug either in Debian Squeeze (from which I don't have an ordinary workstation installation, only embedded) or from EmDebian.

thanks so far for the feedback
 
Old 12-10-2011, 08:58 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I happen to have a squeeze x86_64 installation, w/ at v.3.1.12, and your
example fires & disappears as expected. Makes me think it has to do w/ the
embedded part of your install after all.

Do you actually have strace installed on the embedded system?



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 07:54 AM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
Command "mail" returns "panic: temporary file seek" kenneho Linux - Software 5 12-23-2008 03:27 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration