Script to Run Multiple Systems Checks and mail me the results after every reboot- Linux
Hello,
I'm trying to create a mechanism wherein a set of Production servers will email me the results of system checks like Uptime, NFS Mounts and a Process after every scheduled reboot.
For this, I figured I'd use the @reboot parameter that crond comes with.
I have added the below onliner in crontab for root:
No mail. If I run the above line on a shell, I get proper email with all the status.
I figured the ; after each command may be cutting the command run on crontab and tried as below:
I guess crontab is possibly not able to handle variable declaration.
I dont want to run a script from crontab since this is a production server and I wont be allowed to place my script anywhere in filesystem.
Could anyone help me with this please?
Bonus question: I notice that @reboot option runs even if the crond service is restarted whereas the documents say this will run only on boot/reboot. Is this not weird?
Hello Team .
I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are
1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ?
2. The same... (2 Replies)
Hi,
I need to perform the untar and rm operation if the file found is a .tar and does not have test.tar or hello.tar as the file names.
Below is the loop to check the same.
for tf in *.tar
do if ]
then found=1
... (1 Reply)
Hello,
Currently i have a script which will disply the results in plain text format.
I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html and send that content as email.
Please help me how i can do that.
I am using... (10 Replies)
HI everyone,
I would like to have a script to run a certain linux command and mail the results or output of this command.
This shell is to be later on set as cronjob.
thanks in advance. (9 Replies)
Hi friends,,,
I am running one server on Ubuntu 12.04 LTS 32-bit, some times my pc restarts automatically, with no reason, I have a script to start server which requires root password. in this directory
/myserver/start_server.sh
How can I do this ?
and some scripts I am having that I... (1 Reply)
How we can run the multiple instances of the script? I need to run the script which I am calling from the below function.I can doit with cron but I don't want to put it in the cron.This cript dploy the build and here I want when the build stage then it should run with multilpe instances of... (6 Replies)
Hello,
I am a Unix newbie and I need a script in which I can run a command on multiple servers at work. The command is to start a storage process and I am sick of doing it manually on all servers..
Here's the command:
/opt/bss/bin/snmptable -CB -v2c -c P67LzuBm hostname hrStorageTable... (4 Replies)
Hi all,
i have a script in /etc/init.d directory.
-rwxr-xr-x 1 root root 26 Mar 28 16:00 myscript
I need it to run when my linux reboots/startup. However is it not being executed. Do i need to put in in the rc.local directory? (1 Reply)
Noob question ..
My Java based application needs to change some user passwords based on some user actions. Since this application can run on Redhat AS2.1 / AS4.0 / Solaris 9 etc, the most safe and portable solution that I could think of was: Use expect.
Now, expect is not available on all... (1 Reply)