summaryrefslogtreecommitdiff
path: root/scripts/checksel.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checksel.cmd')
-rw-r--r--scripts/checksel.cmd15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/checksel.cmd b/scripts/checksel.cmd
new file mode 100644
index 0000000..2897b76
--- /dev/null
+++ b/scripts/checksel.cmd
@@ -0,0 +1,15 @@
+@echo off
+REM checksel.cmd
+REM This at script runs ipmiutil sel, writing any new records to syslog,
+REM and will then clear the SEL if free space is low.
+
+REM Get path from arg 0
+set ipmiutildir=%~d0%~p0
+
+cd %ipmiutildir%
+cmd /c %ipmiutildir%\ipmiutil sel -w | findstr /c:"WARNING: free space"
+if errorlevel 1 goto done
+cmd /c %ipmiutildir%\ipmiutil sel -d
+
+:done
+