In a backup script I am trying to get the blocks used by the backup once completed.
I am using the function:
to return the blocks used of said directory and contents.
Via. command line it works perf, However in the backup script it returns exactly double the blocks used ...
ie: if there are 459552 blocks used it returns 919104!
If I include "-h" (as below) it does return the correct value.
I am calling it like:
This baffles me, Any ideas why this happens.
Hi,
I have just written a script in /bin/bash, however, l want to test if character is a carriage return or space. Also l want my script to be able to detect my disk space and send a mail if usage is more than 90% or send an alert.
Thanks
Kayode (6 Replies)
Some times my disk space is used upto 100% due to the application logs .
So this script is to monitor the disk space usage and wall message to the users about the disk space usage if it exceeds the limit set in the script. Here for example the limit is set to 80%. This job is added in cron to... (2 Replies)
Issue with disk space usage
I have the following line in my "df -h" output:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 496M 495M -39M 109% /
What is the issue with having 9% excess utilisation? How can I find out what this partition is... (2 Replies)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Hi All,
I have written a script to check the file system usage and to delete the files which is consuming more space.Please check whether the script is corrcet
#Script Starts here
#!/usr/local/bin/perl
#Program to find the disk space and to delete the older files
#Checks the type of OS... (8 Replies)
Given this directory /web
I need to get the current usage (in %) on Linux and Unix both using the same command on bash shell ?
The command i tried was working on Unix (solaris) but does not filter the desired same value when run of Linux.
My command df -h /web | awk '{print $5}' | sed -n... (5 Replies)
hi all members
I have a shell script to generate disk space usage email alert if threshold is more than 80 %, now the requirement changed to keep sending alert emails for every 5% incremental usage ........ Any help would be greatly appreciated.
ex - 80% , 85% ,90%,95%,100% we should get an... (6 Replies)
Discussion started by: anil529
6 Replies
LEARN ABOUT OPENSOLARIS
ndmpstat
ndmpstat(1M) System Administration Commands ndmpstat(1M)NAME
ndmpstat - show NDMP backup progress statistics
SYNOPSIS
ndmpstat [tapes] [interval [count]]
DESCRIPTION
The ndmpstat utility reports Network Data Management Protocol (NDMP) statistics, among which are NDMP worker threads, disk IO, tape IO,
files operation, performance, and backup activity.
ndmpstat reports the aggregate statistics for all tapes and disks. In order to obtain statistics for specific tape devices, the tape device
name should be passed as argument to the utility.
When invoked, ndmpstat begins its display with a one-line summary of the NDMP daemon activity since the NDMP service was invoked.
Display Fields
The fields in ndmpstat output are described as follows:
wthr
Report the number of worker threads in each of the four following states:
r
the number of worker threads running
w
the number of blocked worker threads that are waiting for resources such as I/O and paging
b
the number of backup operations currently running
r
the number of restore operations currently running
file
Report on usage of filesystem.
rd
the number of files being read
wr
the number of files being written
disk
Report the number of disk operations per interval.
rd
the number of disk blocks being read
wr
the number of disk blocks being written
tape
Report the number of tape operations per interval. There are slots for up to four tapes, labeled with a single number. The number indi-
cates the name of the device under /dev/rmt.
rd
the number of tape blocks being read
wr
the number of tape blocks being written
bytes
Report the number of bytes transferred. This is the aggregate value of both tape and disk devices. The number is in kilobytes.
rd
the number of kilobytes being read
wr
the number of kilobytes being written
perf
Displays a rough estimate of performance of the backup/restore operation in megabytes per second.
bk
backup performance
rs
restore performance
prcnt
Display the comparative usage of resources, in percent.
dsk
disk I/O time
tpe
tape I/O time
otr
other time (memory or idle)
See EXAMPLES.
OPERANDS
The following operands are supported:
count Specifies the number of times that the statistics display is repeated.
tape Specifies which tapes are to be given priority in the output. A command line is limited to a maximum of four tape devices. A
common tape name is /dev/rmt/n, where n is an integer.
interval Specifies the number of seconds over which ndmpstat summarizes activity. The specified interval remains in effect till the com-
mand is terminated.
EXAMPLES
Example 1 Using ndmpstat
The following command displays a summary of NDMP daemon activity at five-second intervals.
example% ndmpstat 5
wthr file disk tape bytes perf prcnt
r w b r rd wr rd wr rd wr rd wr bk rs dsk tpe otr
1 0 3 6 50 9 1250 0 32544 4455 42335 3234 5 4 20 40 40
1 0 0 1 1 0 128 0 0 128 64 64 1 0 0 80 20
1 0 0 1 2 0 128 0 0 0 64 0 1 0 80 0 20
1 0 0 1 1 0 128 0 0 0 64 0 1 0 80 0 20
1 0 0 1 3 0 128 0 0 0 64 0 0 0 80 0 20
1 0 0 1 1 0 128 0 0 128 64 64 1 0 0 80 20
^C
example%
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWndmpu |
+-----------------------------+-----------------------------+
|Interface Stability |See below |
+-----------------------------+-----------------------------+
Invocation is evolving. Human readable output is unstable.
SEE ALSO iostat(1M), mpstat(1M), ndmpd(1M), ndmpadm(1M), attributes(5)NOTES
Performance numbers are not accurate and are rounded up at the MB/sec. boundary.
SunOS 5.11 21 Jun 2007 ndmpstat(1M)