Forum Discussion

Seth_Hollist's avatar
7 years ago

bpdbjob field for dedupe ratio

***** Moved to new post from https://vox.veritas.com/t5/NetBackup/what-are-the-fields-for-dedupe-ration-policy-type-in-bpdbjobs/m-p/592882  *****

When I run this command:

bpdbjobs -all_columns | cut -d ',' -f61

I get a bunch of garbage in the output, not simple two-digit numbers that I'd expect.

  • Nicolai's avatar
    Nicolai
    7 years ago

    I got the follow command line working:

    From bpdbjobs -all_columns  -jobid 1281

    Report=scanned: 694598 KB\, CR sent: 23075 KB\, dedup: 96.68%,02/12/2018 17:04:12

    The dedupe value can then be retrived :

    # bpdbjobs -most_columns -jobid 1281 | awk -F',' '{ print $58 }' 
    96.680000

    If using a script the status of field 2 and 3 need to be looked at since some jobs type does not have a dedupe rate:

    # Field 1 = Jobtybe     0 = backup 4 =duplicate 6 = catalog backup 17 = image cleanup
    # Field 2 = State         0 = queued 1=active 2=wait for retry 3=done

    Best Regards
    Nicolai

  • Seth_Hollist

    Always best to start a new discussion for your query and to mention your NBU version.

    Please show us your exact command and the output?

    According to the Command Reference , the dedupe field is indeed field 61. 
    field61 = Deduplication ratio percent

    I would personally use awk to extract certain fields.

    • Nicolai's avatar
      Nicolai
      Moderator

      I got the follow command line working:

      From bpdbjobs -all_columns  -jobid 1281

      Report=scanned: 694598 KB\, CR sent: 23075 KB\, dedup: 96.68%,02/12/2018 17:04:12

      The dedupe value can then be retrived :

      # bpdbjobs -most_columns -jobid 1281 | awk -F',' '{ print $58 }' 
      96.680000

      If using a script the status of field 2 and 3 need to be looked at since some jobs type does not have a dedupe rate:

      # Field 1 = Jobtybe     0 = backup 4 =duplicate 6 = catalog backup 17 = image cleanup
      # Field 2 = State         0 = queued 1=active 2=wait for retry 3=done

      Best Regards
      Nicolai

      • Seth_Hollist's avatar
        Seth_Hollist
        Level 3

        Nicolai,

        That's exactly what I needed, Thanks!

        All the documentation I searched seemed to suggest you can only get the de-dup rate from using the "-all_columns" switch, and as we all know that puts a lot of other junk in there that makes using "cut" or "awk" more difficult to use. At least for those of us who aren't "awk" or "sed" experts.