Skip to content

Basic memory usage check for Linux#66

Merged
wh1te909 merged 4 commits intoamidaware:mainfrom
BelleNottelling:Linux_Mem_Check
Jul 18, 2022
Merged

Basic memory usage check for Linux#66
wh1te909 merged 4 commits intoamidaware:mainfrom
BelleNottelling:Linux_Mem_Check

Conversation

@BelleNottelling
Copy link
Copy Markdown
Contributor

As the tin says.
Configurable by passing a value to the check

@dinger1986
Copy link
Copy Markdown
Contributor

Hi Benjamin,

Are these scripts confirmed working? If so please PR to scripts folder and update the json 😃.

https://docs.tacticalrmm.com/contributing_community_scripts/

Thanks!

@BelleNottelling
Copy link
Copy Markdown
Contributor Author

Hi Benjamin,

Are these scripts confirmed working? If so please PR to scripts folder and update the json 😃.

https://docs.tacticalrmm.com/contributing_community_scripts/

Thanks!

Yes, I have these checks in use on all my Linux servers.
They are all Debian / Ubuntu though so if someone can check with other flavors of Linux that would be good.
I've also just updated this PR to add it to the main folder and the json as requested, once this one is merged and I know I'm doing this how you'd like, I'll update the other.

@BelleNottelling
Copy link
Copy Markdown
Contributor Author

BelleNottelling commented Jul 18, 2022

Hey, @dinger1986 @silversword411, would either of you mind reviewing this when you get a chance?

Thanks!

@silversword411
Copy link
Copy Markdown
Contributor

You added bash to the tests, need @wh1te909 to look at and approve this one.

@silversword411 silversword411 requested a review from wh1te909 July 18, 2022 19:47
Comment thread test_json.py Outdated

def test_community_script_json_file():
valid_shells = ["powershell", "python", "cmd"]
valid_shells = ["powershell", "python", "cmd", "bash"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this might be a bit confusing lol but for linux the shell is determined by the shebang and the top of the script, so can be any shell really not just bash. so instead of bash it needs to be shell as in shell scripts. see https://github.com/amidaware/tacticalrmm/blob/5e37728f66ff712a20b7078499ab8214d6d62b01/api/tacticalrmm/tacticalrmm/constants.py#L120 for list of valid shells

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry about that, I was basing it off of what was listed here:
https://docs.tacticalrmm.com/contributing_community_scripts/#json-field-names

I just pushed a commit to update it to shell instead of bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you I will fix the docs

Copy link
Copy Markdown
Member

@wh1te909 wh1te909 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wh1te909 wh1te909 merged commit 62423ed into amidaware:main Jul 18, 2022
@BelleNottelling BelleNottelling deleted the Linux_Mem_Check branch July 19, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants