When you have servers, automating tasks is always useful, it saves us time and also helps with fault tolerance, you know… «do such a thing in case of low ram » ... "restart such service if such socket fails»... etc, the detail is that to automate tasks, the first thing is to know the current status of the server.
Script to display information from our system
I had told you about a script which was showing Apache RAM consumption statistics, this time I will tell you about a script that displays this information:
- Is or is not connected to the internet
- Operating system
- Distro
- Architecture
- Kernel
- Hostname
- Internal IP
- External IP
- DNS you use
- Logged users
- RAM and SWAP statistics
- HDD space
- Time it took for the script to display the information
- Uptime
How to obtain Script that shows information from our system
The first thing is to download it, then give it execution permissions, finally we execute it with the -I parameter so that it is installed in our system and it is easier to execute it in the future. Open a terminal and put the following commands:
wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh chmod + x tecmint_monitor.sh ./tecmint_monitor.sh -I
It will ask us for the password, we type it, press Enter and that's it, we can see the information of our system by executing:
monitor
Examples of information provided by the Script:
As you can see in the commands, the author of the script is TecMint.com, thanks Avishek Kumar for post it.
Well, nothing, I hope it is useful to you 