Révision 8f0e3e45
Initial version
| plugins/other/samba_locked | ||
|---|---|---|
| 1 |
#!/bin/sh |
|
| 2 |
# |
|
| 3 |
# Plugin to monitor the number of Samba locked files on the machine. |
|
| 4 |
# |
|
| 5 |
# Parameters: |
|
| 6 |
# |
|
| 7 |
# config (required) |
|
| 8 |
# autoconf (optional - used by munin-config) |
|
| 9 |
# |
|
| 10 |
# $Log$ |
|
| 11 |
# Revision 1.0 2007/04/16 Jon Higgs |
|
| 12 |
# Initial Release - Adapated from jimmyo's processses plugin. |
|
| 13 |
# |
|
| 14 |
# Magick markers (optional - used by munin-config and som installation |
|
| 15 |
# scripts): |
|
| 16 |
#%# family=auto |
|
| 17 |
#%# capabilities=autoconf |
|
| 18 |
|
|
| 19 |
if [ "$1" = "autoconf" ]; then |
|
| 20 |
echo yes |
|
| 21 |
exit 0 |
|
| 22 |
fi |
|
| 23 |
|
|
| 24 |
if [ "$1" = "config" ]; then |
|
| 25 |
|
|
| 26 |
echo 'graph_title Samba Locked Files' |
|
| 27 |
echo 'graph_args --base 1000 -l 0 ' |
|
| 28 |
echo 'graph_vlabel number of locked files' |
|
| 29 |
echo 'graph_category Samba' |
|
| 30 |
echo 'graph_info This graph shows the number locked Samba Files.' |
|
| 31 |
echo 'samba_locked.label Locked Files' |
|
| 32 |
echo 'samba_locked.draw LINE2' |
|
| 33 |
echo 'samba_locked.info The current number of locked files.' |
|
| 34 |
exit 0 |
|
| 35 |
fi |
|
| 36 |
|
|
| 37 |
echo -n "samba_locked.value " |
|
| 38 |
smbstatus -L 2> /dev/null | grep -c DENY_ |
|
| 39 |
|
|
| 40 |
|
|
Formats disponibles : Unified diff