[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to track source of sleep signal?



Vikram Vincent <vincentvikram@gmail.com> writes:

> Thanks!!
>
>> Use something like 'pstree' or 'ps axf' or 'ps -eH' and look at what
>> is calling sleep.
>
>    |---net.agent -e /lib/udev/net.agent
>   │   └─sleep 1
>   ├─net.agent -e /lib/udev/net.agent
>   │   └─sleep 1
>
> Seems that net.agent is calling sleep. I wonder why?

I don't know anything about that, but the only sleep command in
/lib/udev/net.agent is the following:

  wait_for_interface() {
      local interface=$1
      while :; do
          local state="$(cat /sys/class/net/$interface/operstate 2>/dev/null || true)"
          if [ "$state" != down ]; then
                  return 0
          fi
          sleep 1
      done
  }

Possibly you have a network interface that is toggling between up and
down.  Try looking at the /sys/class/net/*/operstate files and see if
any of them are changing.

-- 
Carl Johnson		carlj@peak.org



Reply to: