Welcome to the Linux Foundation Forum!

LFS201 - Chapter 4 Discussion // Questions // Banter

blackbear710blackbear710 Posts: 23

SIGNALS

Comments

  • chrisfeigchrisfeig Posts: 25

    What are the most common situations a Liinux sysadmin will face that might require the use of signal/s, and what are the signals the sysadmin should send?

    Starting with a process is consuming system resources (CPU/memory) and is unresponsive, or is running in the background and for some reason can't be closed normally. If my understanding is correct, the sysadmin should send SIGTERM and if this doesn't work, SIGKILL. Is this correct?

    Any others? (I know there were at least a couple from the office hours session)

  • blackbear710blackbear710 Posts: 23

    Great Question, LoL >> The only command I really know is Kill for processes, but I am not 100% on Signal Sending :// Falling behind with work everyday and being a slacker.... I will catch back up though, I'm not a complete Potato

  • blackbear710blackbear710 Posts: 23

    maybe @luisviveropena could enlighten us with his Linux Wisdom

  • heiko_sheiko_s Posts: 34

    I'm not a sys admin, but have used Linux for some time (lets say decades).

    Every once in a while a process hangs and doesn't close down. You would probably start with SIGTERM, and use SIGKILL if the process doesn't respond.

    Yesterday one of the participants said he uses SIGSTOP and later SIGCONT to stop a process and continue it later at a time when the resources aren't needed.

    As for programmers, they might catch signals and react on them so that their program ends gracefully.

    But the main use is to kill a process that has run astray.

  • luisviveropenaluisviveropena Posts: 544

    Hi all,

    @chrisfeig you are right. There are also two other signals that might be useful: SIGSTOP for stopping a process, and SIGCONT for continue a process. I remember Amaury mentioned yesterday that was useful for him, when working with a database related process, when you just can't kill the entire process, hehehe.

    Many regards,
    Luis.

  • owenpkentowenpkent Posts: 6

    where do we find signals.c?

  • coopcoop Posts: 437

    It's in the solutions tarball discussed in the introduction under resources, which tells you how to download it

  • fcioancafcioanca Posts: 475

    It can also be downloaded directly from the menu, under Resources > Files.

Sign In or Register to comment.