We have updated our Terms of Service, Code of Conduct, and Addendum.

is there a function that works with tabular data, like `top` output from linux?

Options

Before I build something, is there a function that works with tabular data, like `top` output from linux? Could not find anything with google, but new to the product so maybe I don't know what to search for yet.

Answers

  • CriblNinja
    CriblNinja Posts: 5
    Options

    I would look at the Cribl Pack for Nix that can be downloaded at the packs dispensary: https://packs.cribl.io/ Specificallys I know it has a route and pipeline for top, because I've talked about it on a webinar in the past.

  • Franky Laarits
    Franky Laarits Posts: 59 ✭✭
    Options

    Okay, cool - haven't been there yet, thanks. It's not top in my case though, it's a specific other function

  • Jon Rust
    Jon Rust Posts: 439 mod
    Options

    Cribl Event Breakers understand header-based tabular data like that no problemo.

  • Franky Laarits
    Franky Laarits Posts: 59 ✭✭
    Options

    Hmm not in my case. Had to add a little sed to replace spaces with a tab, then added a little awk while I was there to make it k=v instead

  • Jon Rust
    Jon Rust Posts: 439 mod
    Options

    can you post a sample of your top output here?

  • Franky Laarits
    Franky Laarits Posts: 59 ✭✭
    Options

    ```ID DC Name Class Drain Eligibility Status 0483546f powercloud c-i-0d34e4af61bb5cffb powercloud false ineligible ready 69a038fb servers s-i-07f5953ffd6ebe137 servers false eligible ready 0bca51fb servers s-i-06410d27d607bb353 servers false eligible ready 79e4fdde powercloud c-i-0950b23812f186904 powercloud false eligible ready a2189b90 crmi-454 c-i-0b056ef6e2a264e84 crmi-454 false eligible ready 02616a7d servers s-i-093fcd647569574c3 servers false eligible ready e4aa52ae redis-76 c-i-0057b3383744e1a5a redis-76 false eligible ready```

  • Jon Rust
    Jon Rust Posts: 439 mod
    Options

    that works in my tests with your data above

  • Franky Laarits
    Franky Laarits Posts: 59 ✭✭
    Options

    Oh nice, I wasn't aware of this

  • Franky Laarits
    Franky Laarits Posts: 59 ✭✭
    Options

    Did not see it while searching. But I'm still very new so I learn more than a few things every day