General :: Use The 'at' Command To Run A File That Checks ALL Process
Jun 26, 2011I'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?
View 7 RepliesI'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?
View 7 RepliesI've some file with .sh extensions that runs some softwares.Now,how do I stop running that filesI know we run the command ./start_tomcat.sh to start the apache.Is there any command to stop that file/process or is it just kill the process to stop the process
View 2 Replies View RelatedThere are two host agent process ( hprsmha -WD and RSMHA ) running on my SLES 10 server suddenly hangs which is critical for my daily scheduled backup jobs.I want to create a script which checks for the 2 process and restart it automatically.so i can put it to daily cron job.My knowledge with scripting is so poor. Following are the commands i am running manually to stop and start the process.
cd /etc/init.d
./hprmsha stop
./hprsmha_wd stop
./hprsmha_wd start
./hprsmha start
one tell me the internal working of kill command. that is how it kills a process internally or from where it picks file to continue its process.
View 3 Replies View RelatedI have a many process running in my machine with similar command and the command is 'gzip'. It is running by a program in a file. How will I find out the file which is behind this command.
View 4 Replies View RelatedI want to create a logon script (or somesuch) that creates a file (if it doesn't already exist) and checks the file for some info otherwise. If it finds a given trigger in that file, it logs into a local database and does some operations.
Now my problem isn't with creating that file or even getting it to function as a logon script -- it's with permissions. After the logon script creates the file, I want that user to have read access on it ONLY. Further, I don't want to give the user any kind of root access so that they could do the database operations in question or chown/chmod the file.
What's the best practice here? I'm noticing that whenever the script runs (in .bashrc right now) the script runs with the current user's permissions. Ideally, I'd like to make it so the login script can run at a higher level of permissions, (higher than the user has). Is this even possible? What's the best way to do this?
I have my Media Center running Ubuntu 10.04, and it's annoying to have that "Your disk drives are being checked for errors" message every so often. And ofcourse, as Murphy's law states, it usually happens when I'm in a hurry to quickly watch something.
Ofcourse, I can press 'C' (cancel) all the time. But I guess Ubuntu set up this file check interval for a reason, right? I was wondering if it's save to change the interval so it's less often. Or is it easy to configure the check to occur at SHUTDOWN? That's when most people don't care what the computer does anymore.
Also, although it's a pretty fresh install, any Ubuntu on my machine has never ever ever ever worked flawlessly and neither does this one. More often then not, on shutdown, the computer doesn't shut down but just sits there with a black screen or with the ubuntu logo. So I just power it off. Does this scenario make it unwise to tone down on the number of file checks?
I have a dual boot with Arch linux that share a /home partition. Whenever ubuntu starts tho it tries to do a check on the /home partition and fails.... it gets an error saying unable to check then drops into a shell. I have to run it in recovery mode frequently then start it up and it usually works, but i have to type startx after logging into a shell before that
View 8 Replies View RelatedHow to set that if user use command to display all process, then he'll see only his own processes?
View 2 Replies View RelatedResolved before asked: cat /proc/1111/status | grep PPid
View 2 Replies View RelatedI have tried top and PS command but i am not able to find the RAM used by each process.top command says that 240MB RAM used but the Memory shows 0% for all the processes, same with ps. i want to know which process consumes all 240MB RAM.Is there any command which / script which can sort the running process in oder of increasing RAM usage so that i can see. Also i find it very hard to read bytes and KB. Is there any to way to chnage those units to MB
View 2 Replies View RelatedI got indication of zombie process via top command
Code:
Tasks: 321 total, 1 running, 319 sleeping, 0 stopped, 1 zombie
I don't have 'Z' indication on 'Status' column
How could it possible to identify this process ?
I have created three child process from one parent. And different child has different functions. Child 2 has got function to load file called "wc" to count file1 and and its required to get their files by command line arguments. I can get the files through command line but couldn't get the files when child 2 process start.
View 9 Replies View RelatedI use the system command route from a process (using the system() call). For security reasons the process does not have root privilege and for some reason I cannot use ioctl() either. I tried to set the capabilities of the process to NET_ADMIN and SYS_ADMIN but the route command still failed due to insufficient permissions.
What are the capabilities that I need to set for route to be successful?
Is there any command in linux to figure out , given a process, which processor the process is running? I am interested in figuring out the CPU busy and CPU idle time of that processor.
View 2 Replies View RelatedWhen I fork multiple processes, is there some command or c function to see the cpu number on which the processes are running?
View 3 Replies View RelatedI have a script that calls other scripts/commands which may or may not spawn other process. From my understanding, when I do a ps -ef, the highest numbered process ID is supposed to be the parent ID of all the other related child processes, is this correct? In most or all circumstances, I do a ps -ef | grep <processid> of my script and anything that spawns off that process IDs I assumed are the child processes of my script. If I want to terminate my script and all other child processes, then I kill the parent ID which is the highest numbered PID and this will subsequently kill all other child process IDs, is this correct?
Now, my question is whether there is any quick way of showing what are the child processes of a parent ID instead of what am currently doing now which is visually checking which one is the parent ID and "assuming" that the highest numbered PID is the parent ID of all the other processes. Below is a sample output of running ps -ef | grep exp | grep -v grep. I assume from the output below that the parent process/ID is PID 11322, is that correct?
Code:
oracle 11154 11153 0 21:20 ? 00:00:00 /bin/sh -c (. ~oracle/.profile; /bin/ksh /usr/local/oracle/scripts/expdp_o
oracle 11155 11154 0 21:20 ? 00:00:00 /bin/sh -c (. ~oracle/.profile; /bin/ksh /usr/local/oracle/scripts/expdp_o
oracle 11190 11155 0 21:20 ? 00:00:00 /bin/ksh /usr/local/oracle/scripts/expdp_schema.ksh dev01
oracle 11322 11190 0 21:20 ? 00:00:00 expdp
Is there a way to process the output of a locate command on the spot within bash. The output is 3 lines, ex:
Code:
[root@server confluence]# locate .timestamp
/opt/confluence/confluence-persistent/index/.timestamp
[code]....
I'd like to start a background job using the sudo command and route its output to a file. This presents a problem because the prompt for the password doesn't work properly. It looks something like this when I try it:
Code:
Mac:server user$ sudo php crossdomain_server.php > data/crosscomain_output.txt &
[3] 30303
Mac:server user$ Password:
[3]+ Stopped sudo php crossdomain_server.php > data/crosscomain_output.txt
Mac:server user$
Basically I'm not properly prompted for the password and as soon as I type anything in my background job fails because it didn't receive the password. Is there any way to execute a sudo command by supplying the password on the same line as the command?
Because of my English skills I'll try to explain this subject as best I can, thank you for understanding. Fisrt of all, I am running some program on my slackware in background (using standard method - &). I need to make a script, which allows sending command to this process on my machine from another one. Furthermore this program have to be logged out (standard output f.e. ./myprogram > log.out.txt).It might be a separate Program A which runs my Program B but it cannot be screen, because it is not working like I'd like to and it cannot be java, because it's slow and working not the best so to speak
View 6 Replies View RelatedHow to tell the kill command to ignore processes if that process is not alive?
For example: 3453 is an alive process but 44534 is not.
kill -9 3453 44534
Unix command that allows to know which process is running on processor core?
View 2 Replies View RelatedIs there any command to find out for how many Milli seconds a process is been running?s -a -o pid,etime | grep "process pid" gives the time in min:seconds. I wanted in milliseconds .
View 10 Replies View RelatedThe first call to "somefunction" works as expected. The function prints "endfunction" and a process in background sleeps 30 seconds. In the second call I thought it should work in the same way, but the script sleeps 30 seconds before it prints "endfunction".Does someone know the reason of this behavior? Is there another way to do a command substitution of a function that has a background process without have to waiting for that process?
View 2 Replies View RelatedI write a script to read a file which is something like a pipe (or) queue , which shows the running status.In normal case, if i open this file with cat command, i have to use ctrl+c to exit this . What command shall i use to do the same inside a shell script ? I have tried ^C in my script , but it does not exit the process.
View 6 Replies View RelatedI recently got stocked with this script..it was running fine on an amazon ec2 box (centos based) but when i moved to the actual box...
Code:
Part of the mysql query is not getting the falue.
As you see; i've added echo $VALUE somewhere to verify if the value was picked up... and it is; but dbexist is null..
If i remove the single quote marks i have
Code:
Where 3816253 is the value of $VALUE...
I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?
View 4 Replies View RelatedI want the e2fsck check the filesystem on
every 5th boot.
I want to do a shutdown -rF 3:00 to reboot my RHEL server at 3am tomorrow and force an e2fsck on each volume. But I want the e2fsck to run with the -y switch so it automatically answers yes so it will fix any problems it find automatically.
I can't find anywhere where it says if it will do this or not. does anyone know or have proof? Or is there a better way to do what I'm trying to accomplish?
I'm using CentOS 5.3. After booting up, where can I find the log file that contains if all services where successfully loaded or not? For example when computer boots you get a list of start services and they can be OK or FAILED. Is there a log file where this information is kept? I had a look in the following directory /var/log/ but not sure which one will contain the informaiton that I need.
View 2 Replies View Related