script to get hard disk health in fedora/ubuntu
First, put this in a script.
|
|
and then put this in cron:
Continue readingFirst, put this in a script.
|
|
and then put this in cron:
Continue readingApache provides a module to see the server-status. However the page is not too good looking. So, if you want to see a better looking information page, then you can download :
http://sourceforge.net/projects/pimpapachestat/
More details from the readme file of the project:
REQUIREMENTS
- On the system you want to install the pimped Apache status:
– any webserver with php 5 (with curl; no database is needed)- On all webservers you want to monitor:
– apache 2.x
– installed module mod_status and ExtendedStatus On
– permission for the monitoring server to request the the
alias /server-status (see below)
And tehn for installation:
Continue readingIf you have to keep viewing RFC’s and you miss index and links in RFC while viewing rfc, then you should check-out rfc2html. It is scrtip that takes plain text rfc and converts it to html.
You can get the original code from sourceforge.
However, I found some small issues with the script and have sent a mail to the authour about the same. In the meantime, you can use the diff below to fix the issue’s or download this diff file rfc2html.diff and apply the diff:
Continue readingHere is a simple command for you. It uses inotify tools. So first you need to install :
sudo yum install inotify-tools
and then you can try something like this:
while true; do inotifywait -r -e modify --exclude=".swp" . && make; done
Here, once the file changes, we are running make, but you can do anything you want.
Continue reading
Here are some more clients that you can use with mpd.
sudo yum install mpd mpc qmpdclient.x86_64 gmpc.x86_64 sonata.x86_64
mpd is ::
Music Player Daemon (MPD) is a flexible, powerful, server-side application for
Continue reading
playing music. Through plugins and libraries it can play a variety of sound
files (e.g., OGG, MP3, FLAC, AAC, WAV) and can be controlled remotely via its
network protocol. It can be used as a desktop music player, but is also great
for streaming music to a stereo system over a local network. There are many
GUI and command-line applications to choose from that act as a front-end for
browsing and playing your MPD music collection.
Generally quite a lot of us would have used the script command. This generates the logs for the session. But the problem with the logs is that it contains a lot of un-readable characters. These characters are mostly from the color codes, and as such can be removed very easily with a single command:
cat typescript | perl -pe 's/e([^[]]|[.*.*?[a-zA-Z]|].*?a)//g' | col -b > typescript-processed
This assumes the input log file is named as typescript and the output is kept as typescript-processed. You can change the names as required.
Continue readingJust copy this script to your web-server cgi-bin directory and enjoy.
The script with show the common errors like 404 Error, Internal Server Error and others. It will show the User agent distribution using simple commands like grep, uniq, awk and so on.
You would need to change the tfile – which is temporary file and also the access.log path in the next line.
Just re-direct the output to some file with html extenstion. You could even put this in the cron which re-directs the output to some html in server document root.
Continue reading