Revision 9ca01b5f
Added by Daniel Becker about 12 years ago
usr/local/www/diag_smart.php | ||
---|---|---|
277 | 277 |
default: |
278 | 278 |
{ |
279 | 279 |
// Get all AD* and DA* (IDE and SCSI) devices currently installed and stores them in the $devs array |
280 |
exec("ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'", $devs);
|
|
280 |
exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs);
|
|
281 | 281 |
?> |
282 | 282 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
283 | 283 |
<tr> |
usr/local/www/widgets/widgets/smart_status.widget.php | ||
---|---|---|
42 | 42 |
<?php |
43 | 43 |
$devs = array(); |
44 | 44 |
## Get all adX, daX, and adaX (IDE, SCSI, and AHCI) devices currently installed |
45 |
exec("ls /dev | grep '^[ad][da]a*[0-9]\{1,2\}$'", $devs); ## From SMART status page
|
|
45 |
exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs); ## From SMART status page
|
|
46 | 46 |
|
47 | 47 |
if(count($devs) > 0) { |
48 | 48 |
foreach($devs as $dev) { ## for each found drive do |
Also available in: Unified diff
tighten overly broad regexes for SMART monitoring