CPU, Memory, Disk Utilization Report from Multiple Servers Shell Script - Tech Arkit

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 160

  • @mabashadudekula367
    @mabashadudekula367 3 года назад +2

    Very clear cut explanation sir do more videos on real time common issues with solutions and more videos on Jenkins and aws

  • @julior.inostroza2156
    @julior.inostroza2156 4 года назад +1

    nice video. it help me a lot . now I going to apply into crontab in order to have report of CPU, MEM and Disk from my systems. Thanks 4 video man!!!

  • @bhavyaranign4534
    @bhavyaranign4534 4 года назад +1

    Very well explained.Thanks for the video!

  • @aj_gamer03
    @aj_gamer03 2 года назад +1

    Thank you for sharing .. Really informative 👏
    I want to top command in csv to draw the graph .
    when I get the top command o/p in csv, it's generating in a single column .
    Is there any way to get the data in separate columns? if so please help

    • @TechArkit
      @TechArkit  2 года назад +1

      Yes, you can do that by splitting the command output

  • @simplifiedtech3237
    @simplifiedtech3237 8 месяцев назад +1

    Very well explained

    • @TechArkit
      @TechArkit  7 месяцев назад +1

      Keep watching

  • @Simba29389
    @Simba29389 2 года назад +1

    Hi bro Is there any command to get exact load alone using top command? I needed as a part of a Unix script

  • @shivanandsutar7294
    @shivanandsutar7294 9 месяцев назад +1

    Superb explained

    • @TechArkit
      @TechArkit  9 месяцев назад +1

      Glad you liked it

  • @moinafsana5945
    @moinafsana5945 4 года назад +1

    Thanks for sharing valuable content 🙏

  • @nandhinisakrapani3364
    @nandhinisakrapani3364 2 года назад +1

    What is batch -b for top command

    • @TechArkit
      @TechArkit  Год назад +1

      it brings the top command output as batching

  • @massandougnaglo9633
    @massandougnaglo9633 2 года назад +1

    Hello I like what you are doing it’s so helpful

    • @TechArkit
      @TechArkit  2 года назад +1

      Glad you enjoy it!

    • @massandougnaglo9633
      @massandougnaglo9633 2 года назад +1

      Can you create a script that will help to ??patch a multiple hosts

    • @massandougnaglo9633
      @massandougnaglo9633 2 года назад +1

      I mean a video that will help patch multiple servers using script??

    • @TechArkit
      @TechArkit  2 года назад +2

      @@massandougnaglo9633 use ansible playbook

    • @massandougnaglo9633
      @massandougnaglo9633 2 года назад +1

      @@TechArkit thank you so much for your quick response now I know that it is only ansible we can use to apply patching, I started learning ansible now thank you for the help

  • @swathiraghu3363
    @swathiraghu3363 3 года назад +1

    as per this video i have written the script for grepping the top command process, when the process goes more than 2 gigs, we should receive email.now am getting "integer expression expected" error for line if statement

    • @TechArkit
      @TechArkit  3 года назад +1

      run the script sh -x scriptname.sh you can see debug log where it is getting the error.

    • @swathiraghu3363
      @swathiraghu3363 3 года назад +1

      Below is the error:
      /script1.sh: line 8: [: 3329m: integer expression expected
      date +%F %H: %M %S OK - 3329m on hostname

    • @swathiraghu3363
      @swathiraghu3363 3 года назад +1

      #!/bin/bash
      HOSTNAME=$ (hostname)
      CRITICAL=5g
      CRITICALMAIL="XXXXXXXXX@ssss.com"
      VIRTMEMORY= top -b -n -2 -d1 | grep "process_name" | tail -n1 | awk '{print $5}'
      if [ "$VIRTMEMORY" -ge "$CRITICAL" ]; then
      echo "CRITICAL Virtmemory $VIRTMEMORY Host is $HOSTNAME" | mail -s "VIRTMEMORY is critical" $CRITICALMAIL
      else
      echo "date "+%F %H: %M: %S" OK - $VIRTMEMORY on $HOSTNAME"
      exit
      fi
      done

    • @swathiraghu3363
      @swathiraghu3363 3 года назад +1

      Can I have reply on this please

  • @Swastikbackbencher
    @Swastikbackbencher 3 года назад +1

    18:23, it's not showing CPU usage. It's showing the current time . Please cross verify

    • @TechArkit
      @TechArkit  3 года назад +1

      i think your confused with Date and values, Its date including output.

  • @mingchuuly
    @mingchuuly 3 года назад +1

    When I run the'sh cpumemdisk.sh' command, it says'ssh: Could not resolve hostname cat: Name or service not known'. What should I do in this case?

    • @TechArkit
      @TechArkit  3 года назад +1

      Add host name and IP address into /etc/hosts file

  • @mrstrange6818
    @mrstrange6818 4 года назад +1

    it's really an awesome video. what I exactly search for my 160 node information collect every day. but I am new on Linux. I understand everything but video so fast if you elaborately discuss key generate how to save,this part.
    thanks

    • @TechArkit
      @TechArkit  4 года назад +2

      there is an option to keep play slow in RUclips to understand better.

    • @mrstrange6818
      @mrstrange6818 4 года назад +1

      I found what don't understand. Thanks

    • @TechArkit
      @TechArkit  4 года назад +2

      @@mrstrange6818 Excellent for your quick action. Keep learning. Happy learning.

  • @truptithakur8852
    @truptithakur8852 4 года назад +1

    can tell me where to run type all this comands .... in the remote server's command promt or outside the server bcoz inside server it shows commands as incorrect over the command prompt

    • @TechArkit
      @TechArkit  4 года назад +1

      it is a shell script, follow the tutorial step by step. You have to run this command in Linux Terminal

  • @p.v.sampathkumar2176
    @p.v.sampathkumar2176 2 года назад +1

    It is possible write script using powershell? Can u refer this one

    • @TechArkit
      @TechArkit  2 года назад +1

      yes for windows machines.

  • @Vanitybridal
    @Vanitybridal 3 года назад +1

    Can u tell me how to send email alter for particular user in Java process if memory is greater than threshold value in .ksh script for Linux server

    • @TechArkit
      @TechArkit  3 года назад +1

      it is similar way use ps command and grep the java process then cut the memory usage then validate against the memory usage you would like to validate. then execute email command if condition is true.

    • @Vanitybridal
      @Vanitybridal 3 года назад +1

      @@TechArkit Is this Ps -aux ? If it is how to find total memory of each process and how to find used memory so far for each process ?

    • @Vanitybridal
      @Vanitybridal 3 года назад +1

      @@TechArkit can u put the video of that?I have searched for particular process and don't find any videos related to this?

    • @TechArkit
      @TechArkit  3 года назад +1

      @@Vanitybridal i did not uploaded a similar video.

    • @Vanitybridal
      @Vanitybridal 3 года назад +1

      @@TechArkitCan u put a video of this.It maybe helpful for us a lot?

  • @aamersaeed1529
    @aamersaeed1529 2 года назад +1

    After getting cpu or disk utilization data I want to draw chart/graph using bash script and send the data and chart in email. Is it possible to draw chart using bash script???

    • @TechArkit
      @TechArkit  2 года назад +1

      use graphing service to graph the data however you have to format it appropriately

    • @aamersaeed1529
      @aamersaeed1529 2 года назад +1

      @@TechArkit can u name the graphing service???? Or do you have any video on it then send the link in the comment.

  • @mingchuuly
    @mingchuuly 3 года назад +1

    I am using aws ec2 centos 7 as server.
    When I try to connect via ssh I get permission denied. Is it impossible to use with aws? Please tell me how to fix it

    • @TechArkit
      @TechArkit  3 года назад +1

      see the video in AWS series how to connect to AWS Ec2 instance ruclips.net/video/2_GXHygzWSQ/видео.html

  • @shripathysp7476
    @shripathysp7476 3 года назад +1

    Shall I uses this method for windows server it will work or not

    • @TechArkit
      @TechArkit  3 года назад +1

      you have to write powershell script.

  • @shashankrai1299
    @shashankrai1299 3 года назад +1

    Sir, how to login in multiple server with bash script with different username and their respective passwords, but in my organization there is not allowed to use ssh-keygen and sshpass. THANKS!!!!

    • @TechArkit
      @TechArkit  3 года назад +1

      ruclips.net/video/JPXsReHiViI/видео.html

  • @shwetagairos
    @shwetagairos 4 года назад +1

    excellent, thank you very much !!

    • @TechArkit
      @TechArkit  4 года назад +1

      Thanks for watching.

  • @SHARK224
    @SHARK224 4 года назад +1

    Hi I am beginner of script , may i know what is condition of using double quote , single quote or $

    • @TechArkit
      @TechArkit  4 года назад +1

      ruclips.net/video/9_fhRI-dos4/видео.html See this video you will understand.

  • @Vone_WorldClass
    @Vone_WorldClass 4 года назад +1

    I have issue with command check CPUSAGE top -b -n 1 -dl | grep "Cpu(s)" ..error : top bad delay 'l' .my system is linux 6.5

    • @TechArkit
      @TechArkit  4 года назад +1

      it should work for RHEL 6.5 as well. top -b -n 1

    • @Vone_WorldClass
      @Vone_WorldClass 4 года назад +1

      @@TechArkit for the command top -b -n 1
      is working,but when add top -b -n 1
      -dl is error

    • @TechArkit
      @TechArkit  4 года назад +1

      @@Vone_WorldClass what is the error?

  • @Prachi-no1ut
    @Prachi-no1ut 3 года назад +1

    Even after adding my IP address to the hostlist it's showing connection refused.... Any idea why???

    • @TechArkit
      @TechArkit  3 года назад +1

      did you made passwordless connection?

    • @Prachi-no1ut
      @Prachi-no1ut 3 года назад +1

      @@TechArkit sir u r correct.... That's the catch ... Couldn't make passwordless connection.... even though I did ssh keygeneratiom pasting it in the correct file etc.. still it asks for password

    • @TechArkit
      @TechArkit  3 года назад +1

      @@Prachi-no1ut do not copy manually. use ssh-copy-id

  • @prathapreddy4862
    @prathapreddy4862 5 лет назад +2

    In the below example I want to only display UID and Process Name in the “Access.csv” file which consume MAXIMUM Memory. Write a shell scripts for the same.
    Access.csv
    UID Process Name PID MEMORY
    1, A, 11, 90%
    2, B, 22, 30%
    3, C, 33, 115%
    4, D, 44, 45%

    • @TechArkit
      @TechArkit  5 лет назад +2

      Here you go
      "ps axo ruid,comm,ppid,pid,pmem"

  • @hamedhamed-ox9ty
    @hamedhamed-ox9ty 4 года назад +1

    I hace a problem ssh passwordles authentication ii is prompting for password even i copied the key and also changed tge pernisssions of the folder .ssh and autkey to 777

    • @TechArkit
      @TechArkit  4 года назад +1

      Permissions should be 644 or 600 if you give 777 it wont work.

  • @seekhoaursikhao4046
    @seekhoaursikhao4046 2 года назад +1

    Thank you I liked and subscribed your channel , I am looking for a freeware tool to run and pull out report of all List of windows servers disk utilization and health status . Deadly needed please share the details please . 🙄

    • @TechArkit
      @TechArkit  2 года назад +2

      Use PowerShell module which has plenty of commands to fetch the data. use PExecution tools

  • @AmitSharma09
    @AmitSharma09 3 года назад +1

    How to get the CPU and Memory utilisation using vmstat command?

    • @TechArkit
      @TechArkit  3 года назад +1

      check this out, arkit.co.in/linux-machine-performance-monitoring-vmstat/

  • @yellinasagar
    @yellinasagar 4 года назад +1

    is there any specific shell script to monitor and alert ram,cpu etc., on custom tcp ports like 8080,8000

    • @TechArkit
      @TechArkit  4 года назад +1

      You can just change ssh port number using -p option

    • @yellinasagar
      @yellinasagar 4 года назад +1

      @@TechArkit i couldnot get it, could you brief

  • @dhammsagar
    @dhammsagar 3 года назад +1

    Hii how to install single rpm package to 100 server using shell script.

    • @TechArkit
      @TechArkit  3 года назад +1

      Use for loop
      for I in `car serverlist`;
      do
      ssh user@"$i" rpm -ivm rpmpath
      done

    • @dhammsagar
      @dhammsagar 3 года назад +1

      @@TechArkit thanks

  • @udhayaraav3490
    @udhayaraav3490 5 лет назад +1

    Semmmma superb video ji

    • @TechArkit
      @TechArkit  5 лет назад +1

      Thanks Udhaya Kumar.

  • @mohdfitri5674
    @mohdfitri5674 3 года назад +1

    How do i include this all in one script?:
    c. Display the disk space availability and if the usage has more than 90%, it will prompt
    warning to administrator.
    d. Show process that is more than 70% CPU usage.
    e. Add user individually (one-by-one) with default password set.
    f. Batch add users from a name list (e.g. text file) with default password set.
    g. Disable user individually (one-by-one).
    h. Backup and/or duplicate disk of the system.
    i. Log all the user activities (items b to h) in a log file.

    • @TechArkit
      @TechArkit  3 года назад +1

      Add validation using IF condition

  • @choudhurydebashis10
    @choudhurydebashis10 4 года назад +1

    Can you please help me, if I want to send this report through mail in HTML format

    • @TechArkit
      @TechArkit  4 года назад +2

      use mail command. format the script out as html.

    • @choudhurydebashis10
      @choudhurydebashis10 4 года назад +1

      Tech Arkit Actually I need as below:
      1. process running in all server
      2. check disk usage in all mount point
      3. send mail in html about disk space
      4. Q (QUIT)

    • @TechArkit
      @TechArkit  4 года назад +2

      @@choudhurydebashis10 what is the issue your facing?

    • @choudhurydebashis10
      @choudhurydebashis10 4 года назад +1

      Tech Arkit while sending mail in html format

    • @choudhurydebashis10
      @choudhurydebashis10 4 года назад +1

      Tech Arkit could you please help me with the script for above . I want run it on multiple servers choudhurydebashis10@gmail.com

  • @prashanthpamula1745
    @prashanthpamula1745 4 года назад +1

    Can you make video for sendmail configuration in server(ubuntu/CentOS/rhel).

  • @mr.spymonster3475
    @mr.spymonster3475 3 года назад +1

    It will work in ubuntu server?

    • @TechArkit
      @TechArkit  3 года назад +1

      Not Tested in Ubuntu version

    • @mr.spymonster3475
      @mr.spymonster3475 3 года назад

      @@TechArkit it's working in ubuntu, if we put echo -e .

  • @mrstrange6818
    @mrstrange6818 4 года назад +1

    Dear Brother ,
    My server windows. So how can i get all remote server data by poweshell. Can you help me. I have 150+ node 😔.
    Can you share with me any script for powershell windows server. It will be great help for me.
    Thanks.

    • @TechArkit
      @TechArkit  4 года назад +2

      windows has so many free tools for scanning.

  • @shinojkr6891
    @shinojkr6891 4 года назад +1

    I need to send mail mail too automatically. Sending the report to my mail ID. Plz help

    • @TechArkit
      @TechArkit  4 года назад +2

      mail -s "Subject" youremail@domain.com

  • @wakeelsah9434
    @wakeelsah9434 4 года назад +1

    Awesome sir thanks

  • @sivarajnagarajan9410
    @sivarajnagarajan9410 2 года назад +1

    It’s working but I need my own laptop cpu and memory utilisation details. Kindly refer

    • @TechArkit
      @TechArkit  2 года назад +1

      run it in your laptop

  • @selflovera
    @selflovera Год назад +1

    Hi, could you please provide the script file

    • @TechArkit
      @TechArkit  Год назад +1

      github.com/techarkit/shell-scripting-tutorial

  • @harinigandam9401
    @harinigandam9401 4 года назад +1

    If threshold values of cpu, ram, disk were crossed then output should be as a alert on local web page . Can u send me the code for that⁰⁰0

    • @TechArkit
      @TechArkit  4 года назад +1

      Create the Database and write the values to database and fetch the same details using either HTML or PHP.

    • @harinigandam9401
      @harinigandam9401 4 года назад

      By Using shell script, develop the monitoring tool , which will monitor the threshold values of cpu, ram and disk space. If the threshold value crossed then the output should be as a alert on local web page I need plz

  • @shammikumar2770
    @shammikumar2770 3 года назад +1

    Can you tell how this code work when we having username and password for servers , which part of code we need to add the username and password for the host

    • @TechArkit
      @TechArkit  3 года назад +1

      you can use sshpass command to pass the credentials and execute it in remote server.

  • @potlarambabu8448
    @potlarambabu8448 5 лет назад +1

    Bro can you drop here wmware workstation 14pro and compatible Ubuntu (Linux) links drop please.i have already installed on my pc wmware workstation 15pro already installed because I don't know which compatible this.

    • @TechArkit
      @TechArkit  5 лет назад +1

      Above 16.04 Ubuntu versions will support VMWare 14Pro.

  • @looploop6612
    @looploop6612 5 лет назад +1

    why tail -n 1?

    • @TechArkit
      @TechArkit  5 лет назад +1

      To get last record of the output.

  • @joverdabuet3652
    @joverdabuet3652 4 года назад +1

    Do you have a script for automatic typing of password once you SSH on other servers?

    • @TechArkit
      @TechArkit  4 года назад +1

      Use sshpass command

    • @joverdabuet3652
      @joverdabuet3652 4 года назад

      @@TechArkit It is the only way? Because on the server that I have access, I'm not able to install any package in those servers.
      So... I'm looking for another way to do this.

  • @maheshnaidu5706
    @maheshnaidu5706 4 года назад +1

    Hi, can you make videos on Ansible? Thanks :)

    • @TechArkit
      @TechArkit  4 года назад +1

      It's already published

    • @maheshnaidu5706
      @maheshnaidu5706 4 года назад +1

      @@TechArkit gotcha thanks for that.

  • @harishdara7600
    @harishdara7600 4 года назад +1

    Hi Bro. Could you please make a video on print prime numbers using shell script.

  • @potlarambabu8448
    @potlarambabu8448 5 лет назад +1

    I'm beginner to learning Linux
    Can you share from beginning all videos master link/playlist link.

    • @TechArkit
      @TechArkit  5 лет назад +1

      ruclips.net/video/BskRmjvWG5Y/видео.html Here is the Link.

  • @iwannagosocotra7026
    @iwannagosocotra7026 3 года назад +1

    Can u make a video on how to monitor and collect data for one specific process??
    Could you kindly give an idea so that I can try, could you kindly reply.

    • @TechArkit
      @TechArkit  3 года назад +1

      you can do that as well using ps command.

  • @harinigandam9401
    @harinigandam9401 4 года назад +1

    Can u send the script for that

  • @TheFrozen101
    @TheFrozen101 4 года назад +1

    we need to include the password with ssh command, right ?

    • @TechArkit
      @TechArkit  4 года назад +1

      Use Passwordless connection

  • @zainuddinbrahim4625
    @zainuddinbrahim4625 4 года назад +1

    its a refresher to me

  • @equbqlalam6230
    @equbqlalam6230 3 года назад +1

    scripts not working....share scripts in description

    • @TechArkit
      @TechArkit  3 года назад +1

      check in github.com/techarkit all the scripts are already uploaded.

  • @AmandeepSingh-dr7bd
    @AmandeepSingh-dr7bd 5 лет назад +1

    Please make depth tutorial on webmin, thanks

    • @TechArkit
      @TechArkit  5 лет назад +1

      Sure @Amandeep Singh

  • @tamilselvan8343
    @tamilselvan8343 5 лет назад +1

    what is the d1 ( d=> is delimiter and what is the "1" ) command .can u please explain me.And what is the batch mode

    • @TechArkit
      @TechArkit  5 лет назад +1

      refer man top command for more detailed explanation.

    • @tamilselvan8343
      @tamilselvan8343 5 лет назад +1

      @@TechArkit thank u sir

  • @tusharvirkar2374
    @tusharvirkar2374 3 года назад +1

    Hi plz make video on AIX Unix Admin

  • @rohitpal8028
    @rohitpal8028 4 года назад +1

    Awesome post!! Could you please create similar video for Windows OS too pls

    • @TechArkit
      @TechArkit  4 года назад +1

      you can make use of PowerShell scripts for Windows.

  • @zainuddinbrahim4625
    @zainuddinbrahim4625 4 года назад +1

    thank u ravi

  • @anupdhond
    @anupdhond 4 года назад +2

    you can check root filesystem usage directly by using # df -h / | awk '{print $5}' | tail -n1
    That column and sed was not so necessary. Good video otherwise.

  • @kslvvaraprasad5864
    @kslvvaraprasad5864 3 года назад +1

    whatsapp group full

    • @TechArkit
      @TechArkit  3 года назад +2

      github.com/techarkit/TechArkit-RUclips/blob/master/whatsapp_group.md Join new group