Re: Check Device status

Phil Townes <[email protected]>
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <CAKot1MFFFTre347aFsNPoMTya_PLekm--VTRAuiHPkW40yhXkA@mail.gmail.com>
Hi Tony,

Have you tried FILE, instead of FILESYSTEM?

check file USB_Serial0 with path /dev/ttyUSB0
    if not exist then alert

Cheers!
Phil


On Mon, 29 Jul 2019 at 06:58, Tony Eyles <[email protected]> wrote:

> Is there a way to check if a device is available?
> For example checking if a USB Serial device shown in the system as
> /dev/ttyUSB0 is actively seen by the system?
>
> I have tried
>
> # check for USB serial adaptor as USB0
> check filesystem USB_Serial0 path /dev/ttyUSB0
>     if changed fsflags  then alert
>
> and
>
> # check for USB serial adaptor as USB0
> check filesystem USB_Serial0 path /dev/ttyUSB0
>     if not exist then alert
>
>
>
> Tony
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.