Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
dfa7f969
Commit
dfa7f969
authored
Feb 03, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit some utils
parent
c023e821
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
ipcs_check.sh
web/ipcs_check.sh
+30
-0
tr_log_who.sh
web/tr_log_who.sh
+6
-0
No files found.
web/ipcs_check.sh
0 → 100755
View file @
dfa7f969
#!/bin/sh
# See also /etc/sysctl.d/ipcs
# http://help.directadmin.com/item.php?id=572
EMAIL
=
lav@etersoft.ru
MAX_SEMAPHORES
=
30
IPCS
=
/usr/bin/ipcs
IPCRM
=
/usr/bin/ipcrm
MAIL
=
/bin/mail
COUNT
=
`
${
IPCS
}
|
grep
apache |
wc
-l
`
if
[
"
$COUNT
"
-le
$MAX_SEMAPHORES
]
;
then
#all is well, there are no semaphore build-ups.
exit
0
fi
#we have more than MAX_SEMAPHORES, so clear them out and restart Apache.
for
i
in
`
${
IPCS
}
|
grep
apache |
awk
'{print $2}'
`
;
do
${
IPCRM
}
-s
$i
done
serv httpd2 restart
TXT
=
"
${
COUNT
}
semaphores cleared for apache for
`
hostname
`
"
echo
"
${
TXT
}
"
|
${
MAIL
}
-s
"
${
TXT
}
"
${
EMAIL
}
web/tr_log_who.sh
0 → 100755
View file @
dfa7f969
sed
-e
"s| .*||g"
<
$1
|
sort
|
uniq
-c
|
sort
-n
>
$1
.uniq
tail
-n
20
$1
.uniq |
while
read
n ip
;
do
echo
$n
$ip
$(
resolve
$ip
2>/dev/null
)
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment