General :: "shutdown" Command Allow A Parameter To Determine The Pause Between Sending SIGTERM And SIGKILL?
Jan 1, 2011
The man page seems to indicate no. There is /etc/rc.d/init.d/halt on Fedora. It has a hard coded pause in it, but there's got to be a better way than to change that script.
View 2 Replies
ADVERTISEMENT
Jul 15, 2010
I have a remote server (Xubuntu 10.04) which suffered an electricity brownout yesterday. The server itself is backed with an ups, but it is connected to a external firewire disk, which is not, and this disk malfunctioned as a result of the brownout.
The problem: Now, any process trying to access the external disk freezes and ends up in eternal D state in the process list, including ls and umount. Even trying to ls a directory which contains a symbolic link to a file in that drive just causes ls to freeze. These processes cannot be killed even with SIGKILL, so I proceeded to reboot but...
None of the reboot commands work. Instead they just get added to the ever increasing list of D state processes. I tried (sudo) shutdown -r now, reboot -f now and finally plain shutdown -h now. Is there anything else to try other than ask somebody to actually go to the server and pull the plug (which is not at all trivial)? Some way to tell kernel not to worry about messing stuff up, and just reboot?
View 1 Replies
View Related
Dec 28, 2010
It looks like the -t parameter is no longer available when using the shutdown command. What I'm trying to figure out is how to send all the daemons the kill signal, but wait a certain amount of time before actually halting or rebooting. I can't be the only one wanting to do this, but for all the searching I'm doing I can't find an answer.The following only warns, then waits 1 minute before sending the kill signal and immediately halting, correct? Or am I getting this completely wrong?
Code:# shutdown -h +1
View 4 Replies
View Related
Nov 13, 2010
I want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?
View 4 Replies
View Related
Apr 14, 2011
When you run the following cp command in the BASH terminal, how does Linux know which files are the source and which are the destination when copying multiple files from one location to another?How does Linux know that the services, motd, fstab, and hosts files are the source and the /home/fred/my_dir is the destination?This question came up in a Linux class and I was not sure of the answer. I was thinking it is based on the source path entered ending with a file path and the destination being a directory, but was not sure.
View 4 Replies
View Related
Mar 10, 2010
I have a backup schedule running a full backup everyday. I'm using webmin to manage these backup now. The problem is when the dump command sends a prompt asking if we want to rewrite the tape, Webmin does not display this prompt and we end up having to terminate the backup -> erase the tape(which takes a long time) and then run the backup again.I was wondering if there is a technique that could be used to pass "Yes" as a parameter to the dump command, much like in windows? or if there is a more efficient way of getting this done.
View 2 Replies
View Related
Aug 20, 2010
I am following an instruction on the Internet to set up a timer=1. "You can force use of the timer interrupt by using the timer=1 module arameter (or oprofile.timer=1 on the boot command line" When I type "modprobe oprofile timer=1" at the command line, I got a warning message saying that "Deprecated config file /etc/modprobe.conf" So i want to try other way by setting it at the boot command line.
View 2 Replies
View Related
May 4, 2010
I got the following modprobe scripts modprobe -k -q streams what does the -k parameter mean?. is it exist in older modprobe? I don't see -k parameter in recent modprobe.
View 1 Replies
View Related
Apr 20, 2011
Firstly I would like to say that Linux is very cool, especially the CLI. I have been trying to learn how to do some things in Fedora after being told Fedora was a good distro to get my feet wet. I have run into some issues and cant seem to find any answers. What Linux utility can be configured to automatically save the current logs?
How does your Fedora get an IP number? What IP numbers has your Fedora been assigned since it was installed (based on the logs you have)? What command did you run to determine the IP numbers? What command would you run to determine the number of times a user successfully used "su"? What command would you run to determine the number of times a user unsuccessfully used "su"? Having some issues with the file system as your Fedora boots up.
View 5 Replies
View Related
Feb 11, 2011
Let's say I have a bash script called log.sh. In this script, I want to read in input from a pipe, but I also want to know the command used to pipe input into me. Example:
tail -f /var/log/httpd/error | log.sh
In the shell script, I want to know the command tail -f /var/log/httpd/error.
View 2 Replies
View Related
Jun 13, 2010
Is there a linux/unix command that will return where a domain is hosted at? Basically, the command that is used for [URL]?
View 1 Replies
View Related
Jan 19, 2011
what i need to do is to be able to place a command to slow down the sequence of commands in an Ubuntu script.
normally, the system will attempt to execute them all as fast as it can, but i need to be able to specify short pauses between commands
anyone know of a useful command to do this?
btw, the "sleep" command i saw somewhere hasn't quite worked in my scripts for some reason.
View 2 Replies
View Related
Apr 14, 2010
In Linux, I'd like to know how to find the file(s) if any which as using a particular sector on the hard drive (ext2/3). There is a similar question here regarding Windows, however I need a Linux command line solution (this is a headless system).
View 1 Replies
View Related
Apr 4, 2010
I have a task that I need to let run while I'm away from the computer. It's very CPU intensive and I've even had to throttle down my processor to 3GHz to keep it from overheating. I'm using a combination of GNOME Sensors App and CPU Frequency Scaling Monitor to control the overheating problem. I have the sensors app set to alarm and "killall" at 61 Degrees Celsius. The sensors app has an option where you can enter a command that it will run for you. All I need is to know what command to run that can pause this task. So later I can resume it.
I know it can be done. System Monitor has an option to "stop" a task. It also has "continue". This is how I've been doing it while I'm at the computer. So if anyone knows what the commands are that System Monitor uses, that would be a huge help. By the way, I'm using Ubuntu 9.10 with all current updates.
NOTE: For anyone who is about to flame me for having a computer that overheats and wants to tell me that this is the problem I should be after. It only overheats during this process. Not for any games or compiling or rendering or encoding. Nothing else. I have even bought a new heatsink and fan. I have redone the thermal compound on the Processor. My processor usually runs at idle around 36-39 Celcius and under normal load around 47-53 Celsius.
View 3 Replies
View Related
Jun 26, 2010
Im looking for the command to pause or sleep a process by pid.I dont want to use the kill -STOP
View 1 Replies
View Related
May 17, 2011
I need to run a script that I build to build a word list. Essentially what it does is run through a base list and expands that into billions of words. This way I can keep a small dictionary file and a script to expand it into a larger file (about 500 gigs). This script should take anywhere from 12-14 days to run and on my last day the power went out at my house. Is there anyway I can run this again with a fail over system? I know a battery back up is an ideal addition to my home server but if the power is out for an hour it wouldn't have made a difference. Also if I had the ability to pause the script do a reboot and resume it again that would be amazing.
View 5 Replies
View Related
May 3, 2011
I'm using Linux 11.04 and just installed the most recent version of Postfix. I'm trying to send a simple email (through a relay) but when I run the command
sendmail davea@mydomain.com FROM: fromemail@gmail.com SUBJECT: hello world this is a test email .
It just hangs there. There is nothing in /var/log/mail.log or in any of its accompanying files.
View 4 Replies
View Related
Feb 1, 2010
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 Related
Feb 28, 2011
#1 Ubuntu-10.04-x86_64 (its a form of liunx)
#2 OS 64 bit
#3 java 1.6.0_20
#4 java 64 bit
[Code]....
i need it to look like this below, and load the program called "craft".jar
@ECHO OFF
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%Javajre6injava.exe" -Xms512M -Xmx512M -jar "%~dp0craft.jar"
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xms512M -Xmx1000M -jar "%~dp0craft.jar"
View 4 Replies
View Related
Feb 14, 2010
I received the following output from an rsync (3.0.0) command that was executed:
sending incremental file list
sent 77214 bytes received 484 bytes 155396.00 bytes/sec
total size is 254531170 speedup is 3275.90
What does "sending incremental file list" mean?
View 9 Replies
View Related
Jun 11, 2010
Can I make my messages directly appear at client from server? Normally we type
tailf /var/log/messages
to see messages sent by other machine. So can I send my messages directly at command prompt?
View 2 Replies
View Related
Dec 17, 2010
I'm am not remotely familiar with the linux operating sytem and just need a simple 'cut and paste solution' that will allow me to send .gz files as mail attachments, from the command line.Recently I moved my website to new hosting company, they are using cpanel and I have set up a couple of commands; the cpanel scheduler runs them for me as required.
1.creates an mysql dump and saves it to folder ( in root of my space )Works fine.2. delete the file created above, after 15 mins. Also works fineWhat I really want to do is email the .gz to myself before it is deleted, this is were I am stuck.This is possible ( I believe ) but it is beyond my understanding and ability to write the scipt/command that will make this happen.Please make any instructions really simple and clear as I am really new to this.on the server and this information is provided below and may be helpful to you (but I certainly to not know anything about this type of stuff)
View 7 Replies
View Related
Jul 9, 2010
I have a small board that has a static ram board attached to it. I have two different programs that each write to a byte of memory in the static ram board. I get a file descriptor to the device memory with the following code:
int phymemfd;
phymemfd=open("dev/mem, O_RDWR | O_SYNC);
This opens the physical memory for both reading and writing. Next I get a pointer to the beginning of my ram board.
volatile unsigned char *novram;
novram = (unsigned char *) mmap(0, getpagesize() * 31,
PROT_READ|PROT_WRITE, MAP_SHARED, phymemfd, 0x11AA0000);
I do this same code in two processes that are both running and this works fine. Now, if I take out the O_SYNC parameter, one of the programs gets into some sort of weird state.My understanding of the O_SYNC parameter is that it cause the process accessing the memory location to block, not allow another process to run, until the first process has finished writing to it.I can see that if my program doesn't block, I wouldn't really know what was in the memory location, but would I can't see how it would cause any other type of system problem.
View 1 Replies
View Related
Mar 8, 2009
I need to know how to configure automate sending sms if server reboot and shutdown? Now i just set sms notification once my server it's UP by create scripts in /etc/rc.d/rc.local while booting then from server sending sms notification. SMS - using gnokii attached mobibe phone. Server - Fedora 10
View 3 Replies
View Related
Apr 9, 2010
I am trying following script can I do this or is there a way to do find and replace the replacing word is dynamic input by user
echo -n "Enter name:"
read RP_USER
sed 's/text1/$RP_USER/' /home/user/file1 > /home/user/file2
View 5 Replies
View Related
Dec 10, 2010
looking for a command that shutdown/reboot my ubuntu just same as process that happened when I press shutdown buttonIn fact I need to close all programs that are running and then PC shutdown (that happened when I press shutdown button).
View 9 Replies
View Related
May 6, 2011
I am very new to shell scripting.How does one pass a command-line parameter to a shell script?for the below program
#/bin/bash
mount -t cifs -o user=ramkannan,password=Linux123@ //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql
I want to pass parameter for everything,i tried in google and did but iam getting error while passing parameter to all
#/bin/bash
mount -t cifs -o user=$1,password=$2 //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql
i was getting error while passing parameter to all.
View 2 Replies
View Related
Jan 31, 2011
This started happening about 2-3 weeks ago when i noticed our backups weren't running anymore. whenever i try to run ANY type of scp command I get the following error: warning: Unrecognized configuration parameter permitlocalcommand ssh: FATAL: Illegal -o parameter "PermitLocalCommand no" lost connection
I checked the /etc/ssh/ssh_config file and there was a command PermitLocalCommand commented out, but for testing I even totally removed that line and then in scp forced the use of that file via scp -F /etc/ssh/ssh_config ......
and I still get the same error. This command is nowhere is any of my ssh config files so im at a loss here on how im supposed to fix this!! I even checked my home directory for maybe a ssh config file that might be overridding the system config but nothing.
View 1 Replies
View Related
Apr 20, 2010
I was reading that if I want to do a one time scheduled command, I should use at, which I've never done, as opposed to cron, which i'm kinda familiar with. But what I want to do is reboot my server at 3am tomorrow and force it to check the file systems with a shutdown -rF. For this do I even need to use "at" or could I just say shutdown -rF 3:00.Will that also know that I mean 3am tomorrow and not say in 3 minutes from now or 3pm?
View 14 Replies
View Related
Dec 26, 2010
I have a custom command I've made to quickly shut down all of my xen instances.
Code:
[root@LCENT02 ~]# virtdown
-bash: syntax error near unexpected token `2'
As you can see it fails when I try to run it on the command line. It is stored in an ~/.env file in my home directory. What is odd to me is if I open the .env file and copy the command from there and paste it into the command line, it does actually work!
Code:
[root@LCENT02 ~]# for i in `virsh list | grep -v -e Id -e --- -e Domain-0 | awk '{print $1}'`; do virsh shutdown $i; done
Domain 1 is being shutdown
Domain 2 is being shutdown
Domain 3 is being shutdown
And this is how I have the command entered into my .env file:
Code:
alias virtdown="for i in `virsh list | grep -v -e Id -e --- -e Domain-0 | awk '{print $1}'`; do virsh shutdown $i; done
Why would this command work if you paste it onto the command line but not use the custom command virtdown?
View 1 Replies
View Related