Update rapport_activite/rapport_activites.sh
This commit is contained in:
parent
a6f73cbdff
commit
eaef370646
|
@ -99,14 +99,14 @@ count_removable_accounts() {
|
|||
}
|
||||
|
||||
count_archived_messages() {
|
||||
sudo -Hiu postgres sudo -u ejabberd psql ejabberd -c "select count(*) from archive where peer not like 'irc%' and username not in ('r.giskard', 'lisa.simpson', 'bart.simpson')" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql ejabberd -c "select count(*) from archive where peer not like 'irc%' and username not in ('r.giskard', 'lisa.simpson', 'bart.simpson')" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_users() {
|
||||
sql="select count(distinct owner_)
|
||||
from muclogline_"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_active_users() {
|
||||
|
@ -121,7 +121,7 @@ count_biboumi_active_users() {
|
|||
where m2.owner_ = m1.owner_ ) ) as m0
|
||||
where to_timestamp(m0.date_) > current_timestamp - interval '${since}'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_active_external_users() {
|
||||
|
@ -137,7 +137,7 @@ count_biboumi_active_external_users() {
|
|||
where to_timestamp(m0.date_) > current_timestamp - interval '${since}'
|
||||
and m0.owner_ not like '%chalec.org%'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_inactive_users() {
|
||||
|
@ -152,7 +152,7 @@ count_biboumi_inactive_users() {
|
|||
where m2.owner_ = m1.owner_ ) ) as m0
|
||||
where to_timestamp(m0.date_) < current_timestamp - interval '${since}'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_inactive_external_users() {
|
||||
|
@ -168,7 +168,7 @@ count_biboumi_inactive_external_users() {
|
|||
where to_timestamp(m0.date_) < current_timestamp - interval '${since}'
|
||||
and m0.owner_ not like '%chalec.org%'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_archived_messages() {
|
||||
|
@ -176,7 +176,7 @@ count_biboumi_archived_messages() {
|
|||
sql="select count(body_)
|
||||
from muclogline_"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_active_servers() {
|
||||
|
@ -185,7 +185,7 @@ count_biboumi_active_servers() {
|
|||
from muclogline_
|
||||
where to_timestamp(date_) > current_timestamp - interval '${since}'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
count_biboumi_active_chan() {
|
||||
|
@ -194,7 +194,7 @@ count_biboumi_active_chan() {
|
|||
from muclogline_
|
||||
where to_timestamp(date_) > current_timestamp - interval '${since}'"
|
||||
|
||||
sudo -Hiu postgres sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
sudo -u ejabberd psql biboumi -c "${sql}" -t | grep -v '^$' | awk '{print $1}'
|
||||
}
|
||||
|
||||
get_last_month() {
|
||||
|
|
Loading…
Reference in New Issue