Some comment:
I would stay away from that SIGNAL -9, at least I would find out what could be the side-effects of it.
If httpd is not running because you kill it, service httpd start should be the more appropriated command. Speaking of appropriated, service httpd stop would be a better choice than pkill -9 httpd
It is best to use absolute paths in a cronjob. e.g./sbin/service httpd start
Interesting you are using a variable named loadavg. The Linux kernel keeps a realtime record of that average load in /proc/loadavg. Reading from that would be cleaner that using uptime.
Let's use awk to handle the floating point as well.
The return of awk can be use to follow with a flow control branch
Or set an exit code in awk that can be directly used in the shell's if clause:
I use the 5 minutes average ($2=2nd value), and this should be run every 5..10 minutes.
Last edited by MadeInGermany; 11-04-2014 at 03:07 PM..
Hi..
When i refered the script /etc/rc.sysinit...
i found the "action commands" like
But this is not working in my shells..
the following error is coming...
Please anybody help
Thanks in advance
esham (5 Replies)
hi all
need your help.
I am wrting a script that will load data into the table.
then on another load will append the data into the existing table.
Regards
Ankit (1 Reply)
in /etc/init.d/networking of an ubuntu computer, I found this code:
if ifdown -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
Shouldn't it be replace by
ifdown -a --exclude=lo
... (0 Replies)
Hi All,
I wanted to know what time the box jobs were loaded into a particular Autosys Instance.
Is there a autosys command to find out the above? (The timestamp at which a box was loaded)
I had loaded my JIL script without outputting it to the log file. (4 Replies)
Hi All,
I want to check load balance(or CPU utilzation) on server dynamically based on that value i want to perform some operation .
Means if load balance is <10 then start server .
Am using prstat -a 1
commadn it is listing CPU utilzation/load balancing dynamically ..
How to take this... (7 Replies)
I would like to write a script to do such thing , if a directory have file that the extension is today (yymmdd), then do a specific action , I will run a cron job to run this script .
For example
Today is 2nd , if the directory have files which file name are abc.121102 and def.121102 ,... (6 Replies)
Hello, on my hostserver i see one VPS of mine got load of 200.00 and netstat nothing (not a single blank line on netstat command) after some time, netstat started showing connections, but i see no excessive IP connections.
tail -f /var/log/httpd/access_log shows no activity
/var/log/messages ;... (1 Reply)
Hi,
Im going to use shell script for load the data into DB.
First i need to read the trail file(csv file has two columns with comma separated ) like file name trail1024(last 4 digitsMMDD).
In this trail file 27 entries will have like below,I need to read first csv file name and get the 4... (1 Reply)
Discussion started by: krajasekhar.v
1 Replies
LEARN ABOUT SUSE
apachectl2
APACHECTL(8) apachectl APACHECTL(8)NAME
apachectl - Apache HTTP Server Control Interface
SYNOPSIS
When acting in pass-through mode, apachectl can take all the arguments available for the httpd binary.
apachectl [ httpd-argument ]
When acting in SysV init mode, apachectl takes simple, one-word commands, defined below.
apachectl command
SUMMARY
apachectl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the
functioning of the Apache httpd daemon.
The apachectl script can operate in two modes. First, it can act as a simple front-end to the httpd command that simply sets any necessary
environment variables and then invokes httpd, passing through any command line arguments. Second, apachectl can act as a SysV init script,
taking simple one-word arguments like start, restart, and stop, and translating them into appropriate signals to httpd.
If your Apache installation uses non-standard paths, you will need to edit the apachectl script to set the appropriate paths to the httpd
binary. You can also specify any necessary httpd command line arguments. See the comments in the script for details.
The apachectl script returns a 0 exit value on success, and >0 if an error occurs. For more details, view the comments in the script.
OPTIONS
Only the SysV init-style options are defined here. Other arguments are defined on the httpd manual page.
start Start the Apache httpd daemon. Gives an error if it is already running. This is equivalent to apachectl -k start.
stop Stops the Apache httpd daemon. This is equivalent to apachectl -k stop.
restart
Restarts the Apache httpd daemon. If the daemon is not running, it is started. This command automatically checks the configuration
files as in configtest before initiating the restart to make sure the daemon doesn't die. This is equivalent to apachectl -k
restart.
fullstatus
Displays a full status report from mod_status. For this to work, you need to have mod_status enabled on your server and a text-based
browser such as lynx available on your system. The URL used to access the status report can be set by editing the STATUSURL variable
in the script.
status Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is omit-
ted.
graceful
Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that
currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if
used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing
them. This command automatically checks the configuration files as in configtest before initiating the restart to make sure Apache
doesn't die. This is equivalent to apachectl -k graceful.
graceful-stop
Gracefully stops the Apache httpd daemon. This differs from a normal stop in that currently open connections are not aborted. A side
effect is that old log files will not be closed immediately. This is equivalent to apachectl -k graceful-stop.
configtest
Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about
the particular syntax error. This is equivalent to apachectl -t.
The following option was available in earlier versions but has been removed.
startssl
To start httpd with SSL support, you should edit your configuration file to include the relevant directives and then use the normal
apachectl start.
Apache HTTP Server 2005-09-20 APACHECTL(8)