Comments (5)
I have fixed this issue using the following code:
Line 77-79:
# glob all devices - then discard partitions
@dev = glob($opt_g."*");
@dev = grep(!/[0-9+]$/, @dev);
So I changed the ? to a * and added a grep command.
Here's the output:
check_smart.pl.new -g /dev/sd -i sat
WARNING: [/dev/sda] - Device is clean --- [/dev/sdaa] - Device is clean --- [/dev/sdab] - Device is clean --- [/dev/sdac] - Device is clean --- [/dev/sdad] - Device is clean --- [/dev/sdae] - Device is clean --- [/dev/sdaf] - Device is clean --- [/dev/sdag] - Device is clean --- [/dev/sdah] - Device is clean --- [/dev/sdai] - Device is clean --- [/dev/sdaj] - Device is clean --- [/dev/sdak] - Sectors pending re-allocation --- [/dev/sdb] - Device is clean --- [/dev/sdc] - Device is clean --- [/dev/sdd] - Device is clean --- [/dev/sde] - Device is clean --- [/dev/sdf] - Device is clean --- [/dev/sdg] - Device is clean --- [/dev/sdh] - Device is clean --- [/dev/sdi] - Device is clean --- [/dev/sdj] - Device is clean --- [/dev/sdk] - Device is clean --- [/dev/sdl] - Device is clean --- [/dev/sdm] - Device is clean --- [/dev/sdn] - Sectors pending re-allocation --- [/dev/sdo] - Device is clean --- [/dev/sdp] - Device is clean --- [/dev/sdq] - Device is clean --- [/dev/sdr] - Device is clean --- [/dev/sds] - Device is clean --- [/dev/sdt] - Device is clean --- [/dev/sdu] - Device is clean --- [/dev/sdv] - Device is clean --- [/dev/sdw] - Device is clean --- [/dev/sdx] - Device is clean --- [/dev/sdy] - Device is clean --- [/dev/sdz] - Device is clean|
from check_smart.
One line change --> @dev =glob($opt_g."*[a-z]");
Output:
./check_smart2.pl -g /dev/sd -i scsi
OK: [/dev/sda] - Device is clean --- [/dev/sdaa] - Device is clean --- [/dev/sdab] - Device is clean --- [/dev/sdac] - Device is clean --- [/dev/sdad] - Device is clean --- [/dev/sdae] - Device is clean --- [/dev/sdaf] - Device is clean --- [/dev/sdag] - Device is clean --- [/dev/sdah] - Device is clean --- [/dev/sdai] - Device is clean --- [/dev/sdaj] - Device is clean --- [/dev/sdak] - Device is clean --- [/dev/sdb] - Device is clean --- [/dev/sdc] - Device is clean --- [/dev/sdd] - Device is clean --- [/dev/sde] - Device is clean --- [/dev/sdf] - Device is clean --- [/dev/sdg] - Device is clean --- [/dev/sdh] - Device is clean --- [/dev/sdi] - Device is clean --- [/dev/sdj] - Device is clean --- [/dev/sdk] - Device is clean --- [/dev/sdl] - Device is clean --- [/dev/sdm] - Device is clean --- [/dev/sdn] - Device is clean --- [/dev/sdo] - Device is clean --- [/dev/sdp] - Device is clean --- [/dev/sdq] - Device is clean --- [/dev/sdr] - Device is clean --- [/dev/sds] - Device is clean --- [/dev/sdt] - Device is clean --- [/dev/sdu] - Device is clean --- [/dev/sdv] - Device is clean --- [/dev/sdw] - Device is clean --- [/dev/sdx] - Device is clean --- [/dev/sdy] - Device is clean --- [/dev/sdz] - Device is clean|
from check_smart.
Thank you, works like a charm!
from check_smart.
Thanks guys :)
from check_smart.
Fixed with commit 0a0a3f8 . Thanks for your help!
from check_smart.
Related Issues (20)
- status line 2000GB Gigabyte AORUS M.2 2280 PCIe 4.0 x4 NVMe HOT 4
- Warning thresholds does NOT give the expected result. HOT 2
- Add attribute 188 Command_Timeout to raw check list HOT 1
- Handling dots in attribute names HOT 1
- add aacraid HOT 5
- Request: Auto detect and count all drive on system
- Add special monitoring on SSD attribute 202 (Percent_Lifetime_Remain) HOT 1
- Prioritise output by criticality HOT 14
- Wear_Leveling_Count is not reported as CRIT when disk is almost dead HOT 7
- No performance data on NVMe drive HOT 2
- 6.12.0 regression: invalid interface
- megaraid,N not work with 6.12 HOT 2
- Add TBW calculations for end of life prediction in SSDs HOT 1
- Percent_Lifetime_Remain usage HOT 5
- flag to disable temperature check HOT 2
- Intel ssd wearout not reported when almost dead HOT 9
- check_smart.pl very slow on Almalinux 8 HOT 1
- Percent_Lifetime_Remain threshold unset with -w HOT 19
- No output after pipe HOT 4
- Kingston ssd wearout not detected HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from check_smart.