-->

  • atop a CLI monitoring tool for linux


    atop a CLI monitoring tool for linux




     

    The atop command displays you a more anatomized view of your server's performance. The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu and memory load on process level. Disk load is shown per process if "storage accounting" is active in the kernel. Network load is shown per process if the kernel module `netatop' has been installed. atop a CLI monitoring tool for linux

     

     

    Installation






    ┌──(hackerboy㉿KumarAtulJaiswal)-[~/Desktop]
    └─$ sudo apt-get install atop        
    [sudo] password for hackerboy: 
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libbasicusageenvironment1 libdap25 libgarcon-gtk3-1-0 libgroupsock8 libgtop-2.0-11 libgtop2-common libjsoncpp1 liblivemedia77 libre2-8
      librpm8 librpmbuild8 librpmio8 librpmsign8 libsane libusageenvironment3 libxdo3 libxfce4ui-utils libxpresent1 light-locker
      linux-headers-5.9.0-kali2-amd64 linux-headers-5.9.0-kali2-common linux-image-5.9.0-kali2-amd64 python3-atomicwrites python3-pathtools
      tango-icon-theme x11-session-utils xdotool xfce4-appfinder xfce4-helpers xfce4-panel xfce4-pulseaudio-plugin xfce4-session xfce4-settings
      xfdesktop4 xfdesktop4-data xfwm4 xiccd xinit xorg
    Use 'sudo apt autoremove' to remove them.
    The following NEW packages will be installed:
      atop
    0 upgraded, 1 newly installed, 0 to remove and 137 not upgraded.
    Need to get 201 kB of archives.
    After this operation, 511 kB of additional disk space will be used.
    Get:1 http://ftp.harukasan.org/kali kali-rolling/main amd64 atop amd64 2.6.0-2 [201 kB]
    Fetched 201 kB in 18s (11.1 kB/s)
    Selecting previously unselected package atop.
    (Reading database ... 407475 files and directories currently installed.)
    Preparing to unpack .../atop_2.6.0-2_amd64.deb ...
    Unpacking atop (2.6.0-2) ...
    Setting up atop (2.6.0-2) ...
    update-rc.d: We have no instructions for the atopacct init script.
    update-rc.d: It looks like a non-network service, we enable it.
    Created symlink /etc/systemd/system/timers.target.wants/atop-rotate.timer → /lib/systemd/system/atop-rotate.timer.
    Created symlink /etc/systemd/system/multi-user.target.wants/atop.service → /lib/systemd/system/atop.service.
    atop-rotate.service is a disabled or a static unit, not starting it.
    atopacct.service is a disabled or a static unit, not starting it.
    Processing triggers for kali-menu (2021.2.0) ...
    Processing triggers for man-db (2.9.4-2) ...
    ┌──(hackerboy㉿KumarAtulJaiswal)-[~/Desktop/python/pygeoip/GeoOccupy-new]
    └─$ 
    
    
    
    








     

    Every interval (default: 10 seconds) information is shown about the resource occupation on system level (cpu, memory, disks and  network  layers), followed by a list of processes which have been active during the last interval (note that all pro‐ cesses that were unchanged during the last interval are not shown, unless the key 'a' has been pressed or unless sorting on memory  occupation is done). If the list of active processes does not entirely fit on the screen, only the top of the list is shown (sorted in order of activity). The intervals are repeated till the number of samples (specified as command argument) is reached, or till the  key  'q' is pressed in interactive mode.

     

     

     

    ┌──(hackerboy㉿KumarAtulJaiswal)-[~/Desktop]
    └─$ atop
    ┌──(hackerboy㉿KumarAtulJaiswal)-[~/Desktop]
    └─$ 
    
    
    







     

    When atop is started, it checks whether the standard output channel is connected to a screen, or to a file/pipe. In the first case it produces screen control codes (via the ncurses library) and behaves interactively; in the second case it pro‐ duces flat ASCII-output.

     

     


    ATOP - KumarAtulJaiswal                                       2021/05/13  21:03:18                                       ----------------                                        10s elapsed
    PRC | sys    1.07s | user   4.10s |               | #proc    177 | #trun      2 | #tslpi   565 |               | #tslpu     0 | #zombie    0 | clones     9 |               | no  procacct |
    CPU | sys       9% | user     37% |  irq       0% | idle    354% | wait      0% | steal     0% |  guest     0% |              | ipc notavail | cycl unknown |  curf  500MHz | curscal  25% |
    cpu | sys       3% | user      9% |  irq       0% | idle     88% | cpu002 w  0% | steal     0% |  guest     0% |              | ipc notavail | cycl unknown |  curf  500MHz | curscal  25% |
    cpu | sys       2% | user     10% |  irq       0% | idle     88% | cpu000 w  0% | steal     0% |  guest     0% |              | ipc notavail | cycl unknown |  curf  500MHz | curscal  25% |
    cpu | sys       2% | user      9% |  irq       0% | idle     89% | cpu001 w  0% | steal     0% |  guest     0% |              | ipc notavail | cycl unknown |  curf  500MHz | curscal  25% |
    cpu | sys       2% | user      9% |  irq       0% | idle     89% | cpu003 w  0% | steal     0% |  guest     0% |              | ipc notavail | cycl unknown |  curf  500MHz | curscal  25% |
    CPL | avg1    0.65 | avg5    0.61 |               | avg15   0.51 |              |              |  csw    27567 | intr   10817 |              |              |  numcpu     4 |              |
    MEM | tot     3.6G | free  125.7M |  cache   1.4G | dirty   0.9M | buff  146.2M | slab  175.2M |  slrec 103.7M | shmem 221.1M | shrss  30.5M | vmbal   0.0M |  zfarc   0.0M | hptot   0.0M |
    SWP | tot     7.5G | free    7.5G |               |              |              | swcac   0.0M |               |              |              | vmcom   4.3G |               | vmlim   9.4G |
    PSI | cpusome   1% | memsome   0% |  memfull   0% | iosome    0% | iofull    0% | cs     1/2/2 |               | ms     0/0/0 | mf     0/0/0 | is     0/0/2 |  if     0/0/1 |              |
    DSK |          sda | busy      1% |  read       0 |              | write      3 | KiB/r      0 |  KiB/w     26 | MBr/s    0.0 | MBw/s    0.0 |              |  avq     1.70 | avio 20.0 ms |
    NET | transport    | tcpi      18 |  tcpo      23 | udpi       2 | udpo       2 | tcpao      2 |  tcppo      0 | tcprs      0 | tcpie      0 | tcpor      0 |  udpnp      0 | udpie      0 |
    NET | network      | ipi       21 |  ipo       26 |              | ipfrw      0 | deliv     21 |               |              |              |              |  icmpi      1 | icmpo      1 |
    NET | usb0    ---- | pcki      21 |  pcko      26 | sp    0 Mbps | si    6 Kbps | so    4 Kbps |  coll       0 | mlti       0 | erri       0 | erro       0 |  drpi       0 | drpo       0 |
    
        PID       SYSCPU       USRCPU       RDELAY         VGROW        RGROW       RUID           EUID            ST       EXC        THR        S       CPUNR        CPU       CMD         1/3
      28734        0.04s        1.64s        0.01s            0K           0K       hackerbo       hackerbo        --         -          7        R           1        17%       qterminal
        846        0.33s        0.76s        0.01s         7052K           0K       root           root            --         -         21        S           0        11%       Xorg
       3478        0.14s        0.32s        0.07s            0K        7708K       hackerbo       hackerbo        --         -         71        S           0         5%       firefox-esr
       3662        0.04s        0.23s        0.03s            0K         192K       hackerbo       hackerbo        --         -         25        S           2         3%       Web Content
       3629        0.05s        0.20s        0.04s            0K         264K       hackerbo       hackerbo        --         -         25        S           2         3%       Web Content
      31181        0.04s        0.20s        0.00s            0K        -620K       hackerbo       hackerbo        --         -         26        S           1         2%       Web Content
       2281        0.05s        0.14s        0.00s            0K           0K       hackerbo       hackerbo        --         -          7        S           0         2%       xfwm4
       3679        0.03s        0.13s        0.00s            0K           0K       hackerbo       hackerbo        --         -         24        S           3         2%       Web Content
       2685        0.03s        0.11s        0.00s            0K           0K       hackerbo       hackerbo        --         -          3        S           1         1%       panel-38-netlo
       2688        0.03s        0.10s        0.00s            0K           0K       hackerbo       hackerbo        --         -          3        S           0         1%       panel-40-cpugr
       3649        0.05s        0.07s        0.01s            0K           0K       hackerbo       hackerbo        --         -         24        S           1         1%       Web Content
      24581        0.11s        0.00s        0.02s            0K           0K       root           root            --         -          1        I           2         1%       kworker/2:0-ev
      32260        0.04s        0.04s        0.00s         4912K        3724K       hackerbo       hackerbo        --         -          1        R           3         1%       atop
       3801        0.00s        0.07s        0.00s            0K         264K       hackerbo       hackerbo        --         -         23        S           1         1%       WebExtensions
       3641        0.02s        0.03s        0.00s            0K           0K       hackerbo       hackerbo        --         -         24        S           0         1%       Web Content
        823        0.00s        0.02s        0.00s            0K           0K       debian-t       debian-t        --         -          1        S           1         0%       tor
       2693        0.01s        0.01s        0.00s            0K           0K       hackerbo       hackerbo        --         -          3        S           0         0%       panel-17-pulse
      32236        0.01s        0.01s        0.00s          132K          28K       root           root            --         -          1        S           1         0%       4nonimizer
       9614        0.01s        0.00s        0.00s            0K           0K       hackerbo       hackerbo        --         -         24        S           0         0%       Web Content
       2511        0.00s        0.01s        0.00s            0K           0K       hackerbo       hackerbo        --         -          3        S           3         0%       xfce4-panel
       2262        0.00s        0.01s        0.00s            0K           0K       hackerbo       hackerbo        --         -          3        S           2         0%       at-spi2-regist
        745        0.01s        0.00s        0.00s            0K           0K       root           root            --         -          4        S           1         0%       rsyslogd
         13        0.01s        0.00s        0.00s            0K           0K       root           root            --         -          1        I           2         0%       rcu_sched
         23        0.01s        0.00s        0.00s            0K           0K       root           root            --         -          1        S           2         0%       ksoftirqd/2
      30029        0.01s        0.00s        0.00s            0K           0K       root           root            --         -          1        I           0         0%       kworker/u8:4-e
      29732        0.00s        0.00s        0.00s            0K           0K       hackerbo       hackerbo        --         -         25        S           1         0%       Web Content
    
    





     

    Any Help?





    ┌──(hackerboy㉿KumarAtulJaiswal)-[~]
    └─$ atop -h
    Usage: atop [-flags] [interval [samples]]
                    or
    Usage: atop -w  file  [-S] [-a] [interval [samples]]
           atop -r [file] [-b [YYYYMMDD]hhmm] [-e [YYYYMMDD]hhmm] [-flags]
    
            generic flags:
              -V  show version information
              -a  show or log all processes (i.s.o. active processes only)
              -R  calculate proportional set size (PSS) per process
              -W  determine WCHAN (string) per thread
              -P  generate parseable output for specified label(s)
              -L  alternate line length (default 80) in case of non-screen output
              -f  show fixed number of lines with system statistics
              -F  suppress sorting of system resources
              -G  suppress exited processes in output
              -l  show limited number of lines for certain resources
              -y  show threads within process
              -Y  sort threads (when combined with 'y')
              -1  show average-per-second i.s.o. total values
    
              -x  no colors in case of high occupation
              -g  show general process-info (default)
              -m  show memory-related process-info
              -d  show disk-related process-info
              -n  show network-related process-info
              -s  show scheduling-related process-info
              -v  show various process-info (ppid, user/group, date/time)
              -c  show command line per process
              -o  show own defined process-info
              -u  show cumulated process-info per user
              -p  show cumulated process-info per program (i.e. same name)
              -j  show cumulated process-info per container
    
              -C  sort processes in order of cpu consumption (default)
              -M  sort processes in order of memory consumption
              -D  sort processes in order of disk activity
              -N  sort processes in order of network activity
              -E  sort processes in order of GPU activity
              -A  sort processes in order of most active resource (auto mode)
    
            specific flags for raw logfiles:
              -w  write raw data to   file (compressed)
              -r  read  raw data from file (compressed)
                  symbolic file: y[y...] for yesterday (repeated)
                  file name '-': read raw data from stdin
              -S  finish atop automatically before midnight (i.s.o. #samples)
              -b  begin showing data from specified date/time
              -e  finish showing data after specified date/time
    
            interval: number of seconds   (minimum 0)
            samples:  number of intervals (minimum 1)
    
    If the interval-value is zero, a new sample can be
    forced manually by sending signal USR1 (kill -USR1 pid_atop)
    or with the keystroke 't' in interactive mode.
    
    Please refer to the man-page of 'atop' for more details.
    ┌──(hackerboy㉿KumarAtulJaiswal)-[~]
    └─$                                              
    
    




     

    Advantages of atop


    Atop is an ASCII, full-screen performance monitor which can log and report the activity of all server processes. One feature I really like is that atop stays active in the background for long-term server analysis (up to 28 days by default). Other advantages include:

    • Shows resource usage of all processes, even those that are closed or completed.
    • More Linux resources.
    • Advanced Linux Commands Cheat Sheet for Developers.
    • Get Started with Red Hat Insights.
    • Download Now: Basic Linux Commands Cheat Sheet.
    • Linux System Administration Skills Assessment.
    • Monitors threads within processes and ignores processes that are unused.
    • Accumulates resource usage for all processes and users with the same name.
    • Highlights critical resources using colors (red).
    • Adds or removes columns as the size of the display window changes.
    • Includes disk I/O and network utilization.
    • Uses the netatop kernel module to monitor TCP, UDP, and network bandwidth.






    Disclaimer

     

    This was written for educational purpose and pentest only.
    The author will not be responsible for any damage ..!
    The author of this tool is not responsible for any misuse of the information.
    You will not misuse the information to gain unauthorized access.
    This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!


    All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on www.hackingtruth.in is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.


    All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.



    - Hacking Truth by Kumar Atul Jaiswal



    I hope you liked this post, then you should not forget to share this post at all.
    Thank you so much :-)

     

  • 0 comments:

    Post a Comment

    For Any Tech Updates, Hacking News, Internet, Computer, Technology and related to IT Field Articles Follow Our Blog.