I have a VPS with kloxo
control panel installed. I am using CentOS 5.8 32-bit
.
I restarted Apache today but forgot the time when I did. It is very important to know the exact time.
Can I find it out using the log files or SSH command?
Depending on how Apache and syslog are configured on your machine, it may vary, however with a stock Debian or Ubuntu Apache 2 installation, you'd find the logs in /var/log/apache2/error. log . If it's restarting you should clearly see it in the logs.
Your script could look something along: journalctl --since=<date> --until=<another data> UNIT=<service name> SYSLOG_IDENTIFIER=systemd | awk ' /Started/{ started = 1 } /Stopped/{ if (started) { started = 0; restarted++; } } END { print "It was restarted " restarted "times." } ' The regex here are just an example.
virtual machines - exactly 90 seconds to restart apache httpd - Server Fault.
Apache has been around since 1995 and is responsible as a core technology that helped spur the initial growth of the internet in its infancy. One of the pros of Apache is its ability to handle large amounts of traffic with minimal configuration.
Log in into your VPS via SSH and type in the command:
grep resuming /var/log/httpd/error_log
You can find out this from the Apache logs. You will need to log into your VPS via ssh and check the error_log for your apache instance.
You should find something like the following:
[Tue Apr 09 11:43:23 2013] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
That will tell you exactly when you apache instance was last started successfully
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With