WIP: Closes #11 Added IS_HOME_SIZE #58

Draft
benpro wants to merge 2 commits from 11-Check-for-sysadmins-home-size into master
Contributor

We loop for all sysadmins home dir (using evomaintenance trap) and calculate
their home size. By default warn if more than 1G.

We loop for all sysadmins home dir (using evomaintenance trap) and calculate their home size. By default warn if more than 1G.
benpro self-assigned this 2019-02-19 12:05:20 +01:00
benpro added the
enhancement
label 2019-02-19 12:05:21 +01:00
benpro added a new dependency 2019-02-19 12:06:36 +01:00
First-time contributor

Is not overkill to run du command for every admin accounts ?

That risk to be very long if an account have a big home.

Add a timeout or exit on some size ?

Is not overkill to run **du** command for every admin accounts ? That risk to be very long if an account have a big home. Add a timeout or exit on some size ?
Author
Contributor

I thought about that, but the case where an admin have many small files (take more time than big file to compute) or a very large home must be really rare so I havn't specified any timeout or any fuse break method...

I wonder what could be the best method? timeout need to be installed on the system, it may be unavailable.

Any ideas?

I thought about that, but the case where an admin have many small files (take more time than big file to compute) or a very large home must be really rare so I havn't specified any timeout or any fuse break method... I wonder what could be the best method? `timeout` need to be installed on the system, it may be unavailable. Any ideas?
benpro changed title from Closes #11 Added IS_HOME_SIZE to WIP: Closes #11 Added IS_HOME_SIZE 2019-03-01 10:56:10 +01:00
Author
Contributor

This issue/PR is temporarily suspended, now in WIP mode.

This issue/PR is temporarily suspended, now in WIP mode.
First-time contributor

Could with run it with something like SIGALRM?

https://en.wikipedia.org/wiki/Signal_(IPC)#SIGALRM

doalarm() {
    perl -e 'alarm shift; exec @ARGV' "$@";
}

doalarm 5 du /
Could with run it with something like SIGALRM? <https://en.wikipedia.org/wiki/Signal_(IPC)#SIGALRM> ``` doalarm() { perl -e 'alarm shift; exec @ARGV' "$@"; } doalarm 5 du / ```
Author
Contributor

We should not call perl. Also this check may be never added to production.
It may be enabled when evocheck will have a debug-like mode which do plenty of other "heavy" checks or something like that.
For now this idea is suspended.

We should not call perl. Also this check may be never added to production. It may be enabled when evocheck will have a debug-like mode which do plenty of other "heavy" checks or something like that. For now this idea is suspended.
First-time contributor

The same thing can be done with a very small c program, but I get your point.

The same thing can be done with a very small c program, but I get your point.
This pull request has changes conflicting with the target branch.
  • evocheck.sh
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b 11-Check-for-sysadmins-home-size master
git pull origin 11-Check-for-sysadmins-home-size

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff 11-Check-for-sysadmins-home-size
git push origin master
Sign in to join this conversation.
No description provided.