[systemd-devel] udev event on usb unpluged
christophe.jalady at free.fr
christophe.jalady at free.fr
Sat Aug 29 08:30:16 PDT 2015
sorry for the delay.
Attached are the logs.
The log show the hole process meaning:
Boot
Plug of the usb cable: the device is shown as a "mass-storage" on the other device.
Other device umount. I unplug the cable.
Shutdown of the device.
'jc.log' is the log from my script. You will see 2 "add" event, but no "remove" event.
'udev.log' if the log from "udevadm monitor > /var/log/udev.log 2>&1" since boot time (I launch it from an init.d script at startup).
1) Why I see event in my jc.log but not in udev.log ??
2) Why is there no "usb" event in udev.log (nor add/change or remove ...) ?
For completeness, I attach also my .rule and .sh scripts.
Thanks for your help.
Christophe
----- Mail original -----
De: "Robert Milasan" <rmilasan at suse.com>
À: "christophe jalady" <christophe.jalady at free.fr>
Cc: systemd-devel at lists.freedesktop.org
Envoyé: Mercredi 26 Août 2015 14:35:24
Objet: Re: [systemd-devel] udev event on usb unpluged
On Wed, 26 Aug 2015 15:32:13 +0200 (CEST)
<christophe.jalady at free.fr> wrote:
> >They are not referring to your device, but the machine on which you
> >are
> running the rule.
> >In a terminal/console you run: udevadm monitor
> >The do the removal itself and see what 'udevadm monitor' says.
>
> this is the problem: the machine which are running the rule is a
> "specific robotic device" with one usb port and no screen (and no
> network device). Either I connect through ssh using the usb cable
> (eth over usb) or I use the usb cable to test my plug/unplug process.
> I cannot have a console _and_ test the unplugging at the same time.
Then login into that machine and run screen, in which you run:
'udevadm monitor -u -p > /tmp/udev.log 2>&1'
Do the necessary removal of the usb cable or whatever, then attach
the usb cable again, login again and check the log.
>
> Christophe
>
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb-changed.sh
Type: application/x-shellscript
Size: 633 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150829/07fd589b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 95-usb.rules
Type: application/octet-stream
Size: 52 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150829/07fd589b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udev.log
Type: text/x-log
Size: 2268 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150829/07fd589b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jc.log
Type: text/x-log
Size: 76 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150829/07fd589b/attachment-0002.bin>
More information about the systemd-devel
mailing list