Welcome to the Linux Foundation Forum!

Monitoring processes with bash script

hii im new to linux scripting and i saw this question in a forum and tried to do it myself but coudent can someone help me and show me how to do it

psping [-c ###] [-t ###] [-u user-name] exe-name
Counts and echos number of live processes for a user, whose executable file is exe-name.
Repeats this every second indefinitely, unless passed other specifications using switches:
-c - limit amount of pings, e.g. -c 3. Default is infinite
-t - define alternative timeout in seconds, e.g. -t 5. Default is 1 sec
-u - define user to check process for. Default is ANY user.
thank you

Answers

  • jbalamtlf
    jbalamtlf Posts: 10

    WATCH(1) User Commands WATCH(1)

    NAME
    watch - execute a program periodically, showing output fullscreen

    SYNOPSIS
    watch [options] command

    DESCRIPTION
    watch runs command repeatedly, displaying its output and errors (the
    first screenfull). This allows you to watch the program output change
    over time. By default, command is run every 2 seconds and watch will
    run until interrupted.

Categories

Upcoming Training