Commands for sending signals by explicit request

A. Foreground Processes:

You can use the keyboard to issue a signal on your current processing by pressing a keyboard control sequence t

1. Suspend foreground process

# Ctrl+z

2. Kill foreground process

# Ctrl+c

3. Core Dump

# Ctrl+\

B. Background Process

  1. Check the list of kill option
# kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
..................................
# kill -9 PID

2. Look up processes based on name and kill them

# pgrep -l -u user1
7000 bash
7001 sleep
...............
# pkill -SIGKILL -u user1

Notes: SIGTERM is the default signal, SIGKILL is a commonly misused administrator favorite. Since the SIGKILL signal cannot be handled or ignored, it is always fatal. However, it forces termination without allowing the killed process to run self-cleanup routines. It is recommended to send SIGTERM first, then retry with SIGKILL only if a process fails to respond

3. kill processes running in tty3

# pkill -SIGKILL -t tty3

4. Use the pstree command to view a process tree for the system or a single user.

# pstree -p root

[root@lime ~]# pstree -p root
init(1)─┬─NetworkManager(1785)
├─abrtd(2232)

Introduction to Systemd on CentOS 7

A few terms we need to grasp:

  1. Daemons are processes that wait or run in the background performing various tasks.
  2. To listen for connections, a daemon uses a socket.
  3. service often refers to one or more daemons

If you are moving from CentOS 6 to CentOS 7, you may be wondering why the need to move to systemd. Here are the features

  1. Parallelization capabilities, which increase the boot speed of a system
  2. Automatic service dependency management which can prevent long time-out.
  3. A method of tracking related processes together by using Linux control groups
  4. On-demand starting of daemons without requiring a separate service

Listing unit files with systemctl

  1. Query the state of all units
    # systemctl
  2. Query the state of selected service
    # systemctl --type=service
  3. List full output of the selected service. Useful for detailed check and investigation
    # systemctl status sshd.service -l
  4. To check whether the particular is active and enabled to start at boot time
    # systemctl is-active sshd
    # systemctl is-enabled sshd
  5. List the active state of all loaded units. –all will include inactive units
    # systemctl list-units --type=service
    # systemctl list-units --type=service --all
  6. View the enabled and disabled settings for all units
    # systemctl list-unit-files --type=service
    
  7. View only failed services.
    # systemctl --failed --type=service
    

     


Controlling System Services

a. Status of a Service

# systemctl status sshd.service

b. Disable of a Service

# systemctl disable sshd.service

c. Enable and verify the status of a Service

# systemctl enable sshd.service
# systemctl is-enabled sshd.service

d. Reload configuration file of a running service

# systemctl is-enabled sshd.service

Input/Output Error at General Parallel File System (GPFS)

I was having this error “Input/output error on /usr/local/………….”

I did a mmdiag –waiters on all the NSD Nodes. There are no issues reported.

# mmlsdisk gpfs0
disk         driver   sector failure holds    holds                            storage
name         type       size   group metadata data  status        availability pool
------------ -------- ------ ------- -------- ----- ------------- ------------ ------------
dcs3700A_2   nsd         512    4714 yes      yes   ready         down         system
dcs3700A_3   nsd         512    4715 yes      yes   ready         up           system
dcs3700A_4   nsd         512    4714 yes      yes   ready         down         system
dcs3700A_5   nsd         512    4715 yes      yes   ready         up           system
dcs3700A_6   nsd         512    4714 yes      yes   ready         up           system
dcs3700A_7   nsd         512    4715 yes      yes   ready         up           system
dcs3700B_2   nsd         512    4716 yes      yes   ready         up           system
dcs3700B_3   nsd         512    4717 yes      yes   ready         up           system
dcs3700B_4   nsd         512    4716 yes      yes   ready         up           system
dcs3700B_5   nsd         512    4717 yes      yes   ready         up           system
dcs3700B_6   nsd         512    4716 yes      yes   ready         up           system
dcs3700B_7   nsd         512    4717 yes      yes   ready         up           system
[root@gpfsnsd1]# mmchdisk gpfs0 start -d dcs3700A_2
mmnsddiscover:  Attempting to rediscover the disks.  This may take a while ...
mmnsddiscover:  Finished.
gpfsnsd6:  Rediscovered nsd server access to dcs3700A_2.
gpfsnsd5:  Rediscovered nsd server access to dcs3700A_2.
gpfsnsd10:  Rediscovered nsd server access to dcs3700A_2.
gpfsnsd9:  Rediscovered nsd server access to dcs3700A_2.
Scanning file system metadata, phase 1 ...
6 % complete on Wed Apr 27 13:33:47 2016
25 % complete on Wed Apr 27 13:33:50 2016
41 % complete on Wed Apr 27 13:33:53 2016
58 % complete on Wed Apr 27 13:33:56 2016
76 % complete on Wed Apr 27 13:33:59 2016
90 % complete on Wed Apr 27 13:34:02 2016
100 % complete on Wed Apr 27 13:34:04 2016
Scan completed successfully.
Scanning file system metadata, phase 2 ...
Scan completed successfully.
Scanning file system metadata, phase 3 ...
Scan completed successfully.
Scanning file system metadata, phase 4 ...
Scan completed successfully.
Scanning user file metadata ...
50.23 % complete on Wed Apr 27 13:34:25 2016  (  26607616 inodes   38050968 MB)
100.00 % complete on Wed Apr 27 13:34:45 2016
Scan completed successfully.

References:

  1. Displaying GPFS™ disk states
  2. Changing GPFS disk states and parameters

Compiling and Installing mfix-2016.1

The document to install MFIX can be found at https://mfix.netl.doe.gov/download/mfix/mfix_current_documentation/mfix_user_guide.pdf

We compiled using Intel 12.1.5 and OpenMPI-1.6.5. Once done, you can easily compile with the following configuration parameters

$ ./configure_mfix FC=mpif90 FCFLAGS='-g -O2' --prefix=/usr/local/mfix-2016.1 --dmp
# make -j 16

Copy the libmfix.a to /usr/local/mfix-2016.1

# mkdir /usr/local/mfix-2016.1/lib
# cp libmfix.a /usr/local/mfix-2016.1/lib