LinuxQuestions.org
Visit Jeremy's Blog.
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 06-26-2011, 01:49 PM   #1
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
Question at command


Hello everyone!

I'm trying to use the 'at' command to run a file that checks ALL process running at 5:00pm and does a system load check? Any advice on where to start?

I'm a total newbie when it comes to Linux. But I'm willing to learn from my mistake. Any help will be great.
 
Old 06-26-2011, 02:08 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

first do you have a script which will check what you want (what do you want to check All process running?) ?
then you can put the script to execute at desired time in "crontab" (using_crontab or crontab-quick-reference
 
Old 06-26-2011, 02:08 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Do you want it to run every day, or just once?
 
Old 06-26-2011, 03:34 PM   #4
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hello,

Well I don't have a script yet, but can I just use a simple text format to write the script. I also understand how to use the crontab command as well just not sure where to start.

@MTK358 I only need it for today.
 
Old 06-26-2011, 03:47 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
What do you mean by 'system load check'?
Something like:
Code:
#! /bin/sh
OUTPUT_DIR=/put/your/output/directory/here
/bin/ps -e lf      > ${OUTPUT_DIR}/status.1700
/bin/cat /proc/stat >> ${OUTPUT_DIR}/status.1700
might get you close.

--- rod.

Last edited by theNbomr; 06-26-2011 at 03:51 PM.
 
Old 06-26-2011, 06:56 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You may find this a useful reference http://linux.die.net/man/1/at & HOWTO here http://www.linuxtopia.org/online_boo...-at-batch.html
 
Old 06-26-2011, 09:46 PM   #7
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks for the help everyone..everything went smooth!!
 
Old 06-27-2011, 03:50 AM   #8
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Please Mark the thread as solved if you feel a solution has been provided (under the menu Thread Tools - Mark this thread as solved).
 
  


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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 02:31 PM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 07:30 PM
startx command in FC7 reverts me back to the command prompt sriram87 Linux - Newbie 5 01-04-2008 12:18 AM


All times are GMT -5. The time now is 07:08 AM.

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