OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: GDixon on November 22, 2018, 11:22:28 pm

Title: Smart plugin (Solved)
Post by: GDixon on November 22, 2018, 11:22:28 pm
Hi,

In the smart plugin on the dashboard I show this.

I'm using a old Acer Aspire (AX1200-B1792A) desktop that had vista on it and it has external card readers and such.
For home use this little box handles everything great for what I use. I do plan on a purpose built box after I learn my way around OPNsense in the future.

Since I never use the external card readers how can I tell smart there is no da0 or da1 so they don't show on the dashboard? Is this possible?

It isn't a big deal I'm just trying to clean up whats shown is all.

Second question: Does smart run on it's own or do tests need to be scheduled through cron?

 SMART Status
Drive    Ident    SMART Status
ada0    WD-WX11A11W9451     OK
da0        Unknown
da1        Unknown
Title: Re: Smart plugin
Post by: franco on November 26, 2018, 09:10:37 am
I suspect the data is coming from smartmontools directly so it's hard to filter. The plugin is there, but not really supported anymore. I think Fabian uses it and pushed a few cleanups this year. Best to ask on GitHub.

https://github.com/opnsense/plugins


Cheers,
Franco
Title: Re: Smart plugin
Post by: fabian on November 26, 2018, 06:03:05 pm
@franco

In theory you would only need to filter this array:

https://github.com/opnsense/plugins/blob/master/sysutils/smart/src/www/widgets/widgets/smart_status.widget.php#L45

However I only did some code cleanup in it to fix some UI bugs (like missing CSS classes etc. and I don't like the source btw.).
Title: Re: Smart plugin
Post by: GDixon on November 26, 2018, 06:29:29 pm
so if i modify these lines

Code: [Select]
## Get all adX, daX, and adaX (IDE, SCSI, and AHCI) devices currently installed
exec("ls /dev | grep '^\(ad\|da\|ada\)[0-9]\{1,2\}$'", $devs); ## From SMART status page

to this

Code: [Select]
## Get all adX, adaX (IDE, SCSI, and AHCI) devices currently installed
exec("ls /dev | grep '^\(ad\|ada\)[0-9]\{1,2\}$'", $devs); ## From SMART status page

I should in theory lose the da0 and da1 in the widget?

 Will they be over written on a reinstall or upgrade?
Title: Re: Smart plugin
Post by: fabian on November 26, 2018, 07:54:24 pm
I should in theory lose the da0 and da1 in the widget?
probably yes

Will they be over written on a reinstall or upgrade?
definitely yes however I would not expect an update of the smart widget soon.