This simple script will show the total memory, free memory and percentage of memory used. Have tested it on Ubuntu 14/16 but will work on CentOS as well #!/bin/bash freemem=$(($(free -m |grep "buffers/cache:"|awk '{print $4}'))) totalmem=$(($(free -m |awk 'NR==2 {print $2}'))) usage=$(($totalmem-$freemem)) echo "Memory used: $usage" echo "Total memory: $totalmem" usage=$(($usage*100 / $totalmem)) echo "Usage percentage: $usage" echo "Free memory: $freemem" echo "$TIMESTAMP $totalmem $usage $freemem"
You have configure Kerberos and Winbind to join Active Directory. Configure Samba to use ADS in globals [global] workgroup = ******* realm = ******.COM.PK server string = ***** security = ADS map to guest = Bad Uid password server = ip adrress of Domain Controller log file = /var/log/samba/log.%m max log size = 50 idmap uid = 100000-200000 idmap gid = 100000-200000 cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [Test] path = /d/infopool valid users = rahat.khan, *******\Administrators, *****\rahat.khan admin users = ******\rahat.khan write list = ******\rahat.khan acl group control = Yes guest ok = yes
Comments