Search results

  1. K

    OpManager Raid Monitroing script

    Actually ended up using mdadm tool to accomplish it. Works like a charm. This will work with OpManager. Just set the Critical threshold to 1 and the rearm to 0, no need to set attention or trouble threshold. I hope this helps someone one day. You can edit line 3 to include as many arrays as you...
  2. K

    OpManager Raid Monitroing script

    I am trying to make the following script echo 0 for all raid drives that come back with a 'U' and a 1 when it returns a '_' for raid drive down. However it still print [UU] or [__] #!/bin/bash mdstat=$(cat /proc/mdstat | awk '{print $6}' | grep -A1 'sd' | grep U) 0='U' 1='_' if [$mdstat = 1]...
  3. K

    Need to just grep a value and not the unit

    Thanks dos2unix. This makes sense, I had to a do a 2nd cut. Now why did you not put apostrophes around the : and the k ? I would have assumed this would cause a syntax error but it works like a charm.
  4. K

    Need to just grep a value and not the unit

    Thank you Rob, your explanation makes sense. I was completely overthinking it. I thought I could cut just the number. So using awk would actually make way more sense. Are there any examples of parsing data where you would use the awk and cut command together? I have a basic understanding of the...
  5. K

    Need to just grep a value and not the unit

    when i run: grep SwapCached /proc/meminfo | cut -f 2 -d ':' I receive the following output: 30720 kB How do I remove the kB so I may point the output to our monitoring system, OpManager. I tried to tail -n, I tried awking out. But theres something I am not doing correctly with my syntax.
Top