Sponsored Content
Top Forums Shell Programming and Scripting Script to monitor diskspace of /home/ not to exceed 80% Post 302968728 by MadeInGermany on Monday 14th of March 2016 05:21:17 AM
Old 03-14-2016
You better use df -kP or df -k in a script.
The % in bash/ksh/ash/psh can be chopped off.
Code:
percent=`df -kP /home/. | awk 'NR>1 {print $5}'`
percent=${percent%*%}

or
Code:
percent=`df -kP /home/. | (read _; read _ _ _ _ percent _; echo  ${percent%*%})`

This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor which users enter my home directory

Hi, I would like to monitor which users enter my home directory. Is it possible to write a script or code to do this. I donot have admin privileges. I have given read permissions to access my home directory. Any pointers in this direction is helpful! Thanks, Pradeep Ps: I use the... (1 Reply)
Discussion started by: mnpradeep
1 Replies

2. UNIX for Dummies Questions & Answers

Diskspace

Hi there, pls help me, i have a problem, how i can find out the disk amount of each harddisk per command (not the on label on the Harddisk) i need it on HP UX and Sun. can anybody helb me???? pls thanks Scotty (1 Reply)
Discussion started by: scotty
1 Replies

3. Shell Programming and Scripting

Limitation of DiskSpace Script

Hi, I'm a teacher in Germany and I want to set up a classroom with Linux 8.1 PCs. Every User should have a Max of 100 MB available space. Now I need a script which tells everyone how much diskspace is used in a certain subdirectory. It should work like that: User enters a command like... (1 Reply)
Discussion started by: Dansen
1 Replies

4. Shell Programming and Scripting

Shel Script doesn't work from Exceed

Hi, I am using this script to load up my Oracle Databases, but when I log in through Exceed, it hangs. Can anyone tell me what else I need to add to make this work?? Details ****************************************************************************************************... (11 Replies)
Discussion started by: dnkansah
11 Replies

5. Shell Programming and Scripting

to compute diskspace

Guys, have any idea for the script like this? also to compute w/ decimal. thanks a=10 b=20 c=30 d=40 if a < b then ( a -b)*1024 = free space b + (c -d) = total space if a > b then (b / d)*1024 = cpu (3 Replies)
Discussion started by: kenshinhimura
3 Replies

6. Shell Programming and Scripting

ASM Diskspace

Hi I want to check Oracle ASM disk status through a PERL script. Script flow would be like this ... 1. Its taking diskgroup name in the command line... 2. Connect to Oracle database 3. If connection error send a critical message. Plz replyyyyyyy...... (1 Reply)
Discussion started by: Harikrishna
1 Replies

7. Shell Programming and Scripting

File System exceed Alert Script!

Hello Allz, Please review my following script. The purpose of the script is to check the file system every 5 minutes & if any file systems is exceed from 90% then raise an email alert only 1 time. But the following script not functioning properly, mostly send an email that contain only... (7 Replies)
Discussion started by: telnor
7 Replies

8. Shell Programming and Scripting

[ask]elimination with diskspace

dear all, i want elimination file with disk space for example: $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 62G 19G 41G 31% / /dev/sda1 99M 13M 82M 13% /boot tmpfs 1014M 0... (2 Replies)
Discussion started by: zvtral
2 Replies

9. Shell Programming and Scripting

Looking for shell script to monitor CPU utilization and send mail once exceed 75%

Dear Group, I'm look for shell script to Monitor CPU usage and send mail once it exceed 75% I'm running Suse10.4. (3 Replies)
Discussion started by: clfever
3 Replies

10. Shell Programming and Scripting

DiskSpace Error

Hi, While am preparing the script for diskspace for different partitions different threshhold limit. am getting below error: ./test.sh: syntax error at line 5: `space=$' unexpected Script ==== #!/bin/sh df -h |grep -v '/oradata2'|grep -v '/orabkp' |grep -v '/oradata5' | awk '{ print $5... (7 Replies)
Discussion started by: Pavan83
7 Replies
XBACKLIGHT(1)						      General Commands Manual						     XBACKLIGHT(1)

NAME
xbacklight - adjust backlight brightness using RandR extension SYNOPSIS
xbacklight [-help] [-display display] [-get] [-set percent] [-inc percent] [-dec percent] DESCRIPTION
Xbacklight is used to adjust the backlight brightness where supported. It finds all outputs on the X server supporting backlight brightness control and changes them all in the same way. -get Print out the current backlight brightness of each output with such a control. The brightness is represented as a percentage of the maximum brightness supported. -set percent Sets each backlight brightness to the specified level. -inc percent Increases brightness by the specified amount. -dec percent Decreases brightness by the specified amount. -help Print out a summary of the usage and exit. -time milliseconds Length of time to spend fading the backlight between old and new value. Default is 200. -steps number Number of steps to take while faiding. Default is 20. SEE ALSO
Xrandr(3) AUTHORS
Keith Packard, Open Source Technology Center, Intel Corporation. X Version 11 xbacklight 1.1 XBACKLIGHT(1)
All times are GMT -4. The time now is 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy