Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #57107

Re: misterious behavior of either kill or terminal

From "J.O. Aho" <user@example.net>
Newsgroups alt.os.linux
Subject Re: misterious behavior of either kill or terminal
Date 2019-06-22 09:28 +0200
Message-ID <gn63ksFj5jdU1@mid.individual.net> (permalink)
References <qej6cu$61p$1@dont-email.me> <gn4q47Far67U1@mid.individual.net> <qejlut$sij$1@dont-email.me>

Show all headers | View raw


On 22/06/2019 00.33, Soviet_Mario wrote:
> Il 21/06/19 21:39, J.O. Aho ha scritto:
>> On 21/06/2019 20.07, Soviet_Mario wrote:
>>>
>>> I had launched a very long "dd" proc. un the laptop in a TERMINAL 
>>> (500 gb to transfer).
>>> The light of the drive blinked but no sign of progress were reported 
>>> on screen
>>
>> dd don't output until it's finished.
>>
>>> the copy operation, if relevant, was partition to partition (I used 
>>> no offset for data even if first starting sector of each was reported 
>>> 2048 but I figured out that offset was the start sector of the 
>>> partition itself relative to the beginning of the disk, hence 
>>> indicating the partitions and not the disk as "if=" and "of=" I 
>>> thought 0 offset).
>>> The problem though was the absence of progression
>>>
>>> I have read the manual of dd anyway noticing that it claimed : on 
>>> receiving signal USR1 the process would have printed to stderr some 
>>> stats of activity and then autoresume the work
>>>
>>>
>>> So I collected the PID of the terminal windows where the subprocess 
>>> "dd" was running (I picked up that PID for no "dd" process was 
>>> mentioned in the Process Manager or Monitor I can't recall the name, 
>>> I was using a Live distro, and no hierarchical info was available).
>>
>> The terminal ain't the same as dd, you should have sent the signal to 
>> dd instead.
> 
> mmm, I was afraid so :\
> 
>>
>> pidof dd
> 
> this is the cmq I lacked ...

This command is part of the same package as ps, both provided by procps 
and is part of default installed packages in most distributions except 
embedded ones where they may or may not use busybox instead.


>>> then I did (in another terminal, taking note it was assigned a higher 
>>> PID)
>>>
>>> "sudo kill -SIGUSR1 44356"
>>> the 44356 was original Terminal  PID containing dd
>>
>> And then you get the terminal react on the kill, not dd, 
> 
> yes ... as I feared. I did it not having another PID, and hoping a non 
> recognized signal could be ignored if mis-addressed.
> 
> I'll try to keep in mind of PIDOF !
> 
> ah ... the spell USR1 vs SIGUSR1 is really that relevant ? I read a 
> webpage saying some alternate spells were supported (but I did not care 
> to understand if the information might be distro-specific or so)

Alternative spelling can be version depending, so yes it's important to 
check what yours support like "man kill" can be a good thing to do before.


>>> a part from that : the disk activity kept going on as if there was a 
>>> parentless process still alive in back ground (which I had no way to 
>>> abort, not having any longer a window to receive some CTRL+C to 
>>> cancel, and did not show up in process manager to be manually 
>>> terminated).
>>
>> You can still kill the process, just give the right pid.
> 
> 
> mmm, now it's more difficult ! I have queued (overlapping) another dd 
> instance. Can I rely on the fact that the highest PID is assigned to the 
> later of the two ?

No, with traditional pid numbering, the pid's do start over after a 
while and with the random pid numbering it's quite random, so it's 
better to use the ps u flag, so you get the start time.


>>> but I'd like to understand what would be the right mode to locate a 
>>> child nested process in the PID list or how to pass signal to the 
>>> container (terminal) in order for it to pass the signal to its child 
>>> ....
>>
>> If you want to see the ps output nested, then use the f flag
> 
> ehm ... I don't know what you are talking about. I was referring to the 
> window of Process Monitor/Manager.
> In XFCE version (I suspect it uses GNOME sw) on debian the processes can 
> be shown in TREE-like style (and also the command line is shown).
> But There I was using the live MX distro and the installed SW seems more 
> skinny and poor of subtleties

Not my fault you don't use the power tool but some poor GUI tool.


-- 

  //Aho

Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-21 20:07 +0200
  Re: misterious behavior of either kill or terminal Dan Purgert <dan@djph.net> - 2019-06-21 18:21 +0000
    Re: misterious behavior of either kill or terminal marrgol <marrgol@address.invalid> - 2019-06-22 13:27 +0200
    Re: misterious behavior of either kill or terminal Jasen Betts <jasen@xnet.co.nz> - 2019-06-23 05:31 +0000
      Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-28 10:54 +0200
        Funny... (Was: misterious behavior of either kill or terminal) gazelle@shell.xmission.com (Kenny McCormack) - 2019-06-28 09:15 +0000
        Re: misterious behavior of either kill or terminal Georges <georges@prout.com> - 2019-06-28 11:35 +0200
          Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-28 11:50 +0200
            Re: misterious behavior of either kill or terminal Georges <georges@prout.com> - 2019-06-28 12:21 +0200
            Re: misterious behavior of either kill or terminal Richard Kettlewell <invalid@invalid.invalid> - 2019-06-28 13:26 +0100
              Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-28 14:51 +0200
                Re: misterious behavior of either kill or terminal Richard Kettlewell <invalid@invalid.invalid> - 2019-06-28 14:10 +0100
                Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-28 20:06 +0200
                Re: misterious behavior of either kill or terminal Georges <georges@prout.com> - 2019-06-28 20:54 +0200
                Re: misterious behavior of either kill or terminal owl <owl@rooftop.invalid> - 2019-06-28 14:51 +0000
                Re: misterious behavior of either kill or terminal "F. Russell" <frussell@random.info> - 2019-06-28 17:40 +0000
              Re: misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-28 16:45 +0200
        Re: misterious behavior of either kill or terminal Jasen Betts <jasen@xnet.co.nz> - 2019-06-28 10:29 +0000
          Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-28 14:54 +0200
  Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-21 20:26 +0200
    Re: misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-22 00:02 +0200
      Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-22 13:17 +0200
        Re: misterious behavior of either kill or terminal marrgol <marrgol@address.invalid> - 2019-06-22 13:32 +0200
          Re: misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-23 17:57 +0200
  Re: misterious behavior of either kill or terminal Paul <nospam@needed.invalid> - 2019-06-21 15:14 -0400
    Re: misterious behavior of either kill or terminal Melzzzzz <Melzzzzz@zzzzz.com> - 2019-06-21 20:42 +0000
    Re: misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-22 00:23 +0200
      Re: misterious behavior of either kill or terminal "J.O. Aho" <user@example.net> - 2019-06-22 09:50 +0200
        Re: misterious behavior of either kill or terminal gazelle@shell.xmission.com (Kenny McCormack) - 2019-06-22 19:13 +0000
          Re: misterious behavior of either kill or terminal "J.O. Aho" <user@example.net> - 2019-06-22 23:41 +0200
      Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-22 13:30 +0200
  Re: misterious behavior of either kill or terminal "J.O. Aho" <user@example.net> - 2019-06-21 21:39 +0200
    Re: misterious behavior of either kill or terminal Soviet_Mario <SovietMario@CCCP.MIR> - 2019-06-22 00:33 +0200
      Re: misterious behavior of either kill or terminal "J.O. Aho" <user@example.net> - 2019-06-22 09:28 +0200
      Re: misterious behavior of either kill or terminal "Carlos E.R." <robin_listas@es.invalid> - 2019-06-22 13:34 +0200

csiph-web