The output of the script will be similar to: 02:20:41 up 35 min, 2 users, load average: 0.22, 0.80, 1.05 Memory Usage: 4986/7994MB (62.37%) Disk Usage: 23/68GB (35%) CPU Load: 0.78 ========= vi script1 #!/bin/sh uptime >> /var/log/monitorlog.txt free -m | awk ‘NR==2{printf “Memory Usage: %s/%sMB (%.2f%)\n”, $3,$2,$3*100/$2 }’ >> /var/log/monitorlog.txt df -h | awkContinue reading “Bash script to print/log uptime, load average, cpu usage, diskusage and ram usage”
Category Archives: Linux (Ubuntu/CentOS)
Script to run (log) top command after every few minutes using crontab (CPU utilization logs)
#!/bin/sh top -b -n 1 | head -17 >> /var/log/logging.txt echo “=========” >> /var/log/logging.txt Change the permissions to execute: chmod 777 script1 Put a shell script in one of these folders: /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly or /etc/cron.weekly If these are not enough for you, you can add more specific tasks eg. twice a month or everyContinue reading “Script to run (log) top command after every few minutes using crontab (CPU utilization logs)”
How to install Samba server on Ubuntu 12.04
Part 1: Configuring anonymous share with samba server To install the samba package,enter the following command: sudo apt-get install samba samba-common Check the version of installed samba software by using this command: smbd –version Also install these suggested packages for samba: sudo apt-get install python-glade2 system-config-samba Go to your Windows machine and use this command in order to check the WORKGROUPContinue reading “How to install Samba server on Ubuntu 12.04”
Setup File server on ubuntu 14.04 ( Samba )
Samba is a free software used to enable file and print services on unix-like systems. It runs on most unix variants, such as Linux, AIX, Solaris and BSD. This article helps you to set up file server on ubuntu 14.04 server. This article contains steps for creating both anonymous ( without username and password )Continue reading “Setup File server on ubuntu 14.04 ( Samba )”
How to Install And Configure Samba In Ubuntu For File Sharing
Samba is a useful service found in most Unix and Linux system that allows you to share file and print services with another computer, particularly a Microsoft Windows client. In Ubuntu, while the Nautiilus File Manager comes with a series of connection protocols to access files from a remote server, it doesn’t turn the machineContinue reading “How to Install And Configure Samba In Ubuntu For File Sharing”
Install and Configure Samba share in Ubuntu 13.10 ‘Saucy Salamander’ , 13.04| Howto
One of the most asked features for Samba is a graphical user interface to help with configuration and management, there are several GUI interfaces to Samba available, for me the most simple and powerful one of these tools is samba server configuration tool. In this post, i will show you how to install and configureContinue reading “Install and Configure Samba share in Ubuntu 13.10 ‘Saucy Salamander’ , 13.04| Howto”
Install Samba server in ubuntu 11.04 & Ubuntu 11.10 Oneiric Ocelot
Samba is a free software re-implementation of SMB/CIFS networking protocol, originally developed by Australian Andrew Tridgell. As of version 3, Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also beContinue reading “Install Samba server in ubuntu 11.04 & Ubuntu 11.10 Oneiric Ocelot”
Installing a Squid proxy server on Ubuntu 12.10 with NCSA authentication
Installing Squid I started by installing Squid: sudo apt-get install squid This actually installed Squid 3.1.20, so my Squid configuration file was located at /etc/squid3/squid.conf. Next, I tested whether Squid worked out of the box. I used ifconfig to find out my VM’s IP address, then opened that in a browser on port 3128. IContinue reading “Installing a Squid proxy server on Ubuntu 12.10 with NCSA authentication”
How To Install And Configure Squid Proxy On Ubuntu And Debian
About Squid Proxy Squid Proxy is a a great proxy server mainly used for caching frequently requested web content in order to speed up response time and also save network bandwidth. It supports many different protocols such as HTTP,FTP, TLS, SSL, Internet Gopher and HTTPS. Although it was originally designed to run as a daemon onContinue reading “How To Install And Configure Squid Proxy On Ubuntu And Debian”
How To Setup DNS Server In Ubuntu
About DNS DNS, stands for Domain Name System, translates hostnames or URLs into IP addresses. For example, if we typehttp://www.unixmen.com in browser, the DNS server translates the domain name into its associated ip address. Since the IP addresses are hard to remember all time, DNS servers are used to translate the hostnames like http://www.unixmen.com toContinue reading “How To Setup DNS Server In Ubuntu”