Posts Tagged ‘job’
Saturday, March 24th, 2012
I've written a tiny script to check and restart, Apache if the server encounters, extremely high load avarage like for instance more than (>25). Below is an example of a server reaching a very high load avarage:;
server~:# uptime
13:46:59 up 2 days, 18:54, 1 user, load average: 58.09, 59.08, 60.05
load average: 0.09, 0.08, 0.08
Sometimes high load avarage is not a problem, as the server might have a very powerful hardware. A high load numbers is not always an indicator for a serious problems. Some 16 CPU dual core (2.18 Ghz) machine with 16GB of ram could probably work normally with a high load avarage like in the example. Anyhow as most servers are not so powerful having such a high load avarage, makes the machine hardly do its job routine.
In my specific, case one of our Debian Linux servers is periodically reaching to a very high load level numbers. When this happens the Apache webserver is often incapable to serve its incoming requests and starts lagging for clients. The only work-around is to stop the Apache server for a couple of seconds (10 or 20 seconds) and then start it again once the load avarage has dropped to less than "3".
If this temporary fix is not applied on time, the server load gets increased exponentially until all the server services (ssh, ftp … whatever) stop responding normally to requests and the server completely hangs …
Often this server overloads, are occuring at night time so I'm not logged in on the server and one such unexpected overload makes the server unreachable for hours.
To get around the sudden high periodic load avarage server increase, I've written a tiny bash script to monitor, the server load avarage and initiate an Apache server stop and start with a few seconds delay in between.
#!/bin/sh
# script to check server for extremely high load and restart Apache if the condition is matched
check=`cat /proc/loadavg | sed 's/\./ /' | awk '{print $1}'`
# define max load avarage when script is triggered
max_load='25'
# log file
high_load_log='/var/log/apache_high_load_restart.log';
# location of inidex.php to overwrite with temporary message
index_php_loc='/home/site/www/index.php';
# location to Apache init script
apache_init='/etc/init.d/apache2';
#
site_maintenance_msg="Site Maintenance in progress - We will be back online in a minute";
if [ $check -gt "$max_load" ]; then>
#25 is load average on 5 minutes
cp -rpf $index_php_loc $index_php_loc.bak_ap
echo "$site_maintenance_msg" > $index_php_loc
sleep 15;
if [ $check -gt "$max_load" ]; then
$apache_init stop
sleep 5;
$apache_init restart
echo "$(date) : Apache Restart due to excessive load | $check |" >> $high_load_log;
cp -rpf $index_php_loc.bak_ap $index_php_loc
fi
fi
The idea of the script is partially based on a forum thread – Auto Restart Apache on High Load – http://www.webhostingtalk.com/showthread.php?t=971304Here is a link to my restart_apache_on_high_load.sh script
The script is written in a way that it makes two "if" condition check ups, to assure 100% there is a constant high load avarage and not just a temporal 5 seconds load avarage jump. Once the first if is matched, the script first tries to reduce the server load by overwritting a the index.php, index.html script of the website with a one stating the server is ongoing a maintenance operations.
Temporary stopping the index page, often reduces the load in 10 seconds of time, so the second if case is not necessery at all. Sometimes, however this first "if" condition cannot decrease enough the load and the server load continues to stay too high, then the script second if comes to play and makes apache to be completely stopped via Apache init script do 2 secs delay and launch the apache server again.
The script also logs about, the load avarage encountered, while the server was overloaded and Apache webserver was restarted, so later I can check what time the server overload occured.
To make the script periodically run, I've scheduled the script to launch every 5 minutes as a cron job with the following cron:
# restart Apache if load is higher than 25
*/5 * * * * /usr/sbin/restart_apache_on_high_load.sh >/dev/null 2>&1
I have also another system which is running FreeBSD 7_2, which is having the same overload server problems as with the Linux host.
Copying the auto restart apache on high load script on FreeBSD didn't work out of the box. So I rewrote a little chunk of the script to make it running on the FreeBSD host. Hence, if you would like to auto restart Apache or any other service on FreeBSD server – get /usr/sbin/restart_apache_on_high_load_freebsd.sh my script and set it on cron on your BSD.
This script is just a temporary work around, however as its obvious that the frequency of the high overload will be rising with time and we will need to buy new server hardware to solve permanently the issues, anyways, until this happens the script does a great job 🙂
I'm aware there is also alternative way to auto restart Apache webserver on high server loads through using monit – utility for monitoring services on a Unix system. However as I didn't wanted to bother to run extra services in the background I decided to rather use the up presented script.
Interesting info to know is Apache module mod_overload exists – which can be used for checking load average. Using this module once load avarage is over a certain number apache can stop in its preforked processes current serving request, I've never tested it myself so I don't know how usable it is. As of time of writting it is in early stage version 0.2.2
If someone, have tried it and is happy with it on a busy hosting servers, please share with me if it is stable enough?
Tags: Anyhow, apache server, apache webserver, Auto, avarage, awk print, bak, bash script, bash shell, bash shell script, condition, cron, cron job, Draft, dual core, host, incoming requests, index, index page, init, instance, job, level, level numbers, Linux, linux servers, loc, location, night time, php, quot, Restart, restart apache, rpf, script, server load, server overloads, server services, server uptime, Shell, ssh, ssh ftp, time, unexpected overload, unreachable, utility
Posted in FreeBSD, Programming, System Administration | 5 Comments »
Thursday, January 22nd, 2015
I'm responsbile for a project environment made up of 3 components which is occasionally dying. Here is a short raw overview of environment
- Apache Reverse Proxy (entry door to app server)
- Tomcat Server with an Application enabling web access
- A Java Standalone application using SQLite database
The Tomcat and Java Standalone application is running on top of Windows 2008 RC2 Standard, the overall environment is becoming inacessible periodically and in order to solve that the customer decided to implement a daily Windows server reboot in my opinion this is very bad approach as it is much better to just set an auto reboot of each of components using few tiny batch scripts and Windows Taskmgr, however as the customer is king and decided to implement the reboot its their own thing.
However even fter the daily server reboot was set once a week or so the application was becoming inaccessible and a Tomcat server restart was necessery as a fix.
Finally as a work-around to the issue, I've proposed the logical thing to automatically restart Tomcat once a day early in morning, here is how Tomcat auto Restart was implemented on the Win server:
1. Check out the name of running Tomcat service
First thing is to use the sc command to find out the Tomcat application name:
C:UsersGeorgi>sc query state= all| findstr "Tomcat"
SERVICE_NAME: Tomcat7_r2c
DISPLAY_NAME: Apache Tomcat Tomcat7_r2c
C:UsersGeorgi>
2. Create bat script to stop and start Tomcat service
Press keyboard Win-button + R, start notepad type inside:
@echo off
sc stop Tomcat7_r2c && sc start Tomcat7_r2c
(
Don't be confused from screenshot that I have Tomcat7_MyApp instead of Tomcat7_r2c, but I made screenshot in hurry for another app.
Save the file, somewhere (preferrably) in application folder/bin/ it is best to save it once with bat extension MyApp-Tomcat_Restart.bat and once as MyApp-Tomcat_Restart.xml (XML format file is later needed for import to Task Scheduler which understands .XMLs). The .bat file is good to have because it is useful to somtimes restart Tomcat manually by running it (in case of some sudden Tomcat Appserver occurs even though the auto-restart script).
3. Create new Task using command line (cmd.exe)
Task can be created also from command line using following syntax:
schtasks /Create [/S [/U [/P [ ]]]]
/XML <xmlfile> /TN <taskname>
Simple way to create a new Windows task is shown in below command, it will set my Tomcat Restart script to run everyday in 05:00 early morning when no employees are using the system:
schTasks /Create /SC DAILY /TN "My Task" /TR "C:UsersGeorgiDesktopmyApp-Tomcat_Restart.bat" /ST 05:00
SUCCESS: The scheduled task "Tomcat Restart Task" has successfully been created.
4. Create / Import new Windows "Cron" job
Alternative way is to use Task Scheduler GUI frontend and create new (Basic Task) or import just created script
To run Windows Task Scheduler from comamnd line :
Taskschd.msc
To import already existing .XML formatted file for Task scheduler, right click on the Task Scheduler (Local) and select Import task
Import the myApp-Tomcat_Restart.XML previously created file
Adjust settings to suit your needs, but what change atleast:
- the path to the myApp-Tomcat_Restart.bat file in Actions tab
- the Local User account with which script will be running (administrator) in General tab
After making all changes you will be prompted for server Administrator account password
5. check existing Win Cron job from command line
To see the configured (Scheduled Tasks) in command line mode with a command:
Schtasks.exe
The command is Windows equivalent to UNIX / Linux's crontab, e.g.:
crontab -u root -l
6. Delete existing Windows Task Job from Command line
If you happen to need to delete just created task or any other task from command line (Assuming that you know the previously created task name), use cmd:
C:>schtasks /Delete /TN "Tomcat Restart Task"
WARNING: Are you sure you want to remove the task "Tomcat Restart Task" (Y/N)? y
SUCCESS: The scheduled task "Tomcat Restart Task" was successfully deleted.
Task completed, Tomcat will auto-restart on Windows host at your scheduled time. Feedback is mostly welcome 🙂
Enjoy
Tags: Apache Tomcat Tomcat7_r2c, auto reboot, command, community, Create Import, customer, Delete, door, environment, job, line, opinion, scripts, state, syntax, thing, Tomcat Restart Task, Windows Taskmgr
Posted in Everyday Life, System Administration, Various, Web and CMS, Windows | 2 Comments »
Wednesday, February 12th, 2014 I WORK FOR MONEY IF YOU WANT LOYALTY – HIRE A DOG!
I was told about those picture few months ago by a friend (Ivan Pushkaroff – Pushi) while we were drinking beer together in (Delfincheto – a pub more known among people under the name "Ribkata (The Fish)" – A Metal Music pub in Studentski Grad (Sofia's Student City). By the way if you're in Sofia and near "Studentski Grad" be sure to drop by there – they serve great and always fresh fish also for ex-metal heads for me it is always nice to get some memories about "the good old metal years"
when I tried to complain how difficult it is for me on my job place. I'm a quite sensitive person and a perfectionist and always try to do a great job. Often however there are many obstacles to do your job in right way (as you depend on so many bureaucracy and external people that even if you do your best someone else can mix it up and screw all your effort by not doing his part of the job. The failure of project or Task due to inadeaquacy of someone else involved to do his job right can leave you with a feeling that you have failed even though it is completely not your fault. As these days I'm quite stressed on my job and I have to work on a lot of badly designed projects (and improperly) assigned tasks – yes in big companies it is like these "the right hand doesn't know what the left one is doing". I remembered my dear friend advice to not take it seriously or personally and decided to put these funny picture in hope that these will help me and others to deal with situation of hardships in job in a humorous way After all I'm just a mercenary and I'm doing my best right now in my job at HP … I work for money if they expect higher degree of loyalty let them hire a dog 🙂
Tags: dear friend, drinking beer, effort, feeling, fish, hardships, job, left, lot, money, picture, place, right, screw, situation, someone
Posted in Curious Facts, Entertainment, Everyday Life | No Comments »
Friday, July 27th, 2012 I’ve used K3B just recently to RIP an Audio CD with music to MP3. K3b has done a great job ripping the tracks, the only problem was By default k3b RIPs songs in OGG Vorbis (.ogg) and not mp3. I personally prefer OGG Vorbis as it is a free freedom respecting audio format, however the problem was the .ogg-s cannot be read on many of the audio players and it could be a problem reading the RIPped oggs on Windows. I’ve done the RIP not for myself but for a Belarusian gfriend of mine and she is completely computer illiterate and if I pass her the songs in .OGG, there is no chance she succed in listening the oggs. I’ve seen later k3b has an option to choose to convert directly to MP3 Using linux mp3 lame library this however is time consuming and I have to wait another 10 minutes or so for the songs to be ripped to shorten the time I decided to directly convert the existing .ogg files to .mp3 on my (Debian Linux). There are probably many ways to convert .ogg to mp3 on linux and likely many GUI frontends (like SoundConverter) to use in graphic env.
I however am a console freak so I preferred doing it from terminal. I’ve done quick research on the net and figured out the good old ffmpeg is capable of converting .oggs to .mp3s. To convert all mp3s just ripped in the separate directory I had to run ffmpeg in a tiny bash loop.
A short bash shell script 1 liner combined with ffmpeg does it, e.g.;
for f in *.ogg; do ffmpeg -i "$f" "`basename "$f" .ogg`.mp3"; done.....
The loop example is in bash so in order to make the code work on FreeBSD it is necessery it is run in a bash shell and not in BSDs so common csh or tcsh.
Well, that’s all oggs are in mp3; Hip-hip Hooray 😉
Tags: audio cd, Auto, basename, bash shell script, BSDs, chance, code, consuming, csh, debian linux, Draft, ffmpeg, format, freak, freebsd, freedom, frontends, GNU, gnu linux, job, k3b, Linux, necessery, Ogg, ogg files, oggs, option, RIPs, script, Shell, soundconverter, terminal, time, time consuming, vorbis ogg, work
Posted in Everyday Life, FreeBSD, Linux and FreeBSD Desktop, Linux Audio & Video | No Comments »
Wednesday, May 2nd, 2012 I don't know if someone has thought about this topic but in my view Facebook use in organizations has a negative influence on companies overall efficiency!
Think for a while, facebook's website is one of the largest Internet based "people stealing time machine" so to say. I mean most people use facebook for pretty much useless stuff on daily basis (doesn't they ??). The whole original idea of facebook was to be a lay off site for college people with a lot of time to spend on nothing.
Yes it is true some companies use facebook succesfully for their advertising purposes and sperading the awareness of a company brand or product name but it is also true that many companies administration jobs like secretaries, accountants even probably CEOs loose a great time in facebook useless games and picture viewing etcetera.
Even government administration job positioned people who have access to the internet access facebook often from their work place. Not to mention, the mobility of people nowdays doesn't even require facebook to be accessed from a desktop PC. Many people employeed within companies, who does not have to work in front of a computer screen has already modern mobile "smart phones" as the business people incorrectly call this mini computer devices which allows them to browse the NET including facebook.
Sadly Microsoft (.NET) programmers and many of the programmers on various system platforms developers, software beta testers and sys admins are starting to adopt this "facebook loose your time for nothing culture". Many of my friends actively use the Facebook, (probably) because they're feeling lonely in front of the computer screen and they want to have interaction with someone.
Anyways, the effect of this constant fb use and aline social networks is clear. If in the company the employeed personal has to do work on the computer or behind any Internet plugged device, a big time of the use of the device is being 'invested' in facebook to kill some time instead of investing the same time for innovation within the company or doing the assigned tasks in the best possible way
Even those who use facebook occasionally from their work place (by occasionally I mean when they don't have any work to do on the work place), they are constantly distracted (focus on work stealed) by the hanging opened browser window and respectively, when it comes to do some kind of work their work efficiency drops severely.
You might wonder how do I know that facebook opened browser tab would have bad interaction with the rest of the employee work. Well let me explain. Its a well known scientifically proven fact that the human mind is not designed to do simultaneously multiple tasks (we're not computers, though even computers doesn't work perfect when simultaneous tasks are at hand.).
Therefore using facebook in parallel with their daily job most people nowdays try to "multi task" their job and hence this reflects in poor work productivity per employee. The chain result cause of the worsened productivity per employee is therefore seen in the end of the fiscal quarter or fiscal year in bad productivity levels, bad or worsened quality of product and hence to poor financial fiscal results.
I've worked before some time for company whose CEO has realized that the use of certain Internet resources like facebook, gmail and yahoo mail – hurts the employee work productivity and therefore the executive directors asked me to filter out facebook, GMAIL and mail.yahoo as well as few other website which consumed a big portion of the employees time …
Well apparantly this CEO was smart and realized the harm this internet based resources done to his business. Nowdays however many company head executives did not realize the bad effect of the heavy use of public internet services on their work force and never ask the system administrator to filter out this "employees efficiency thefts".
I hope this article, will be eventually red by some middle or small sized company with deteriorating efficiency and this will motivate some companies to introduce an anti-facebook and gmail use policy to boost up the company performance.
As one can imagine, if you sum up all the harm all around the world to companies facebook imposed by simply exposing the employees to do facebooking and not their work, this definitely worsenes the even severe economic crisis raging around …
The topic of how facebook use destroyes many businesses is quite huge and actually probably I'm missing a lot of hardmful aspects to business that can be imposed by just a simple "innocent facebook use", so I will be glad to hear from people in comments, if someone at all benefits of facebook use in an company office (I seriously doubt there is even one).
Suppose you are a company that does big portion of their job behind a computer screen over the internet via a Software as a Service internet based service, suppose you have a project deadline you have to match. The project deadline is way more likely to be matched if you filter out facebook.
Disabling access to facebook of employees and adding company policy to prohibit social network use and rules & regulations prohibiting time consuming internet spaces should produce good productivity results for company lightly.
Though still the employees can find a way to access their out of the job favourite internet services it will be way harder.
If the employee work progress is monitored by installed cameras, there won't be much people to want to cheat and use Facebook, Gmail or any other service prohibited by the company internal codex
Though this are a draconian measures, my personal view is that its better for a company to have such a policy, instead of pay to their emloyees to browser facebook….
I'm not aware what is the situation within many of the companies nowdays and how many of them prohibit the fb, hyves, google plus and the other kind of "anti-social" networks.
But I truly hope more and more organizations chairman / company management will comprehend the damages facebook makes to their business and will issue a new policy to prohibit the use of facebook and the other alike shitty services.
In the mean time for those running an organization routing its traffic through a GNU / Linux powered router and who'd like to prohibit the facebook use to increase the company employees efficiency use this few lines of bash code + iptables:
#!/bin/sh
# Simple iptables firewall rules to filter out www.facebook.com
# Leaving www.facebook.com open from your office will have impact on employees output ;)
# Written by hip0
# 05.03.2012
get_fb_network=$(whois 69.63.190.18|grep CIDR|awk '{ print $2 }');
/sbin/iptables -A OUTPUT -p tcp -d ${get_fb_network} -j DROP
Here is also the same filter out facebook, tiny shell script / blocks access to facebook script
If the script logic is followed I guess facebook can be disabled on other company networks easily if the router is using CISCO, BSD etc.
I will be happy to hear if someone did a research on how much a company efficiency is increased whether in the company office facebook gets filtered out. My guess is that efficiency will increase at least with 30% as a result of prohibition of just facebook.
Please drop me a comment if you have an argument against or for my thesis.
Tags: awareness, basis, beta testers, college, companies administration, company businesses, computer devices, computer screen, daily basis, Desktop, doesn, etcetera, facebook, government, government administration, interaction, job, Linux, linux routers, machine, Microsoft, mini computer, negative influence, organization network, place, quot, screen, smart phones, social networks, someone, stealing time, succesfully, sys admins, system platforms, time, time machine, topic, useless stuff, work
Posted in Business Management, System Administration | 2 Comments »
Tuesday, April 3rd, 2012 One of the companies, where I'm doing a part time job, as an IT Consultant, System Administrator and Web developer, a e-marketing specialist and business consultant (the list goes on ;)) … planned to integrate a Newsletter support in their WordPress based websites.
As this fits my "job description" ,I took the task and implemented a simple but functional Newsletter support to their 4 WP based sites. In this article I will in short describe, my experience with placing the Newsletter subscription.:
Earlier I've done something similar as, I've added a subscipriotion (form) box to WordPress to use Google Feedburner RSS . What I needed this time, however was a bit different. The company required the newsletter to be a separate one and don't relay on Google Feedburner (RSS) to deal with the subscriptions .
It took me a while until I came with a working version of a Newsletter and I actually tested all in all 4 newsletter wordpress plugins before, I had a well working one. Here in short, In this article I will shortly take a look at the 4 WP newsletter plugins:
1. A wordpress plugin called simply Newsletter
As of time of writting this is the most popular wordpress plugin, when I looked through:
- http://wordpress.org/extend/plugins/
Wordpress Newsletter plugin can be obtained via http://wordpress.org/extend/plugins/newsletter/
Its really Advanced, probably the best free newsletter for WP available as of time of writting. The plugin supports email subscriber user confirmation (double opt-in), as well as can be accustomized to work with single opt-in.
For all those who don't know Double Opt-In is the technical term for a once requested user email (single opt-in), for subscription which is later confirmed by following an email box sent link pointing to confirmation URL.
Double Opt-In is almost a standard and "must" as otherwise, many spam bots will fill in randomly email addresses and your subscribers list will be mostly containing spammer email addresses.
1. Install WordPress Newsletter Plugin To install Newsletter plugin;
a) download and put into wp-content/plugins/ and unzip
server:~# cd /var/www/blog/wp-content/plugins
server:/var/www/blog/wp-content/plugins# wget -q http://downloads.wordpress.org/plugin/newsletter.zip
server:/var/www/blog/wp-content/plugins# unzip newsletter.zip
b) Enable in Plugins:
Plugins -> Newsletter (Activate)
c) Configure Newsletter
A new menu will appear in the left WP control panel, like you see in below screenshot:
Newsletter plugin is very configurable but it takes a bit of longer time until it is confingured to work well. So be patient with it.
d) Make Newsletter field appear on a wordpress home page.
In order to enable just configure Newsletter plugin (text and subscription form) to appear on the wordpress pages, you need to add the plugin as a widget. To do so go to:
Appearance -> Widgets
Drag and drop the Newsletter plugin widget to the widget right pane. Put it on the exact place you would like it to appear.
Once the widget is placed, you will see it appear to the respective location on WP pages, you should have something like:
If while you enable the plugin and put the Newsletter widget doesn't appear on WordPress, this is probably due to some Cache left from some enabled WP caching pugin like W3 Total Cache
In any case if Newsletter form subscription, is not appearing on your pages, delete the cache/ directory:
# rm -rf /var/www/wordpress-site/wp-content/cache/
I've experienced, this caching problems and it was quite a riddle, until I found out that the Newsletter plugin is not appearing on the WP pages because of the old cache. I've checked bacicly everything (error.log , apache php_error.log) etc.. Therein, there was no error or anything, so after a long 1 hour or so poundering I figured out this kind of caching done by W3 Cache.
My guess is, the same newsletter "not working" issue is probably observable also on WP installs with other caching plugins like WP Hyper Cache or WP Db Cache
2. ALO EasyMail Newsletter WordPress plugin
I don't know, why but this plugin didn't work properly on the wordpress install, I've tested it. Its true the wordpress version where I give it a try was not running, the latest stable wordpress so I assume this might be the reason for the empty pages returned when I enabled the plugin.
According to wordpress's plugin – http://wordpress.org/extend/plugins/alo-easymail/, the plugin is marked as Works, however in my case it didn't.
3. Adding WordPress Newsletter through Email newsletter
This plugin was a real piece of cake, compared to all of the rest, tested this one was the easiest one to install and configure on WordPress.
Just like with Newsletter and ALO EasyMail Newsletter once the user is subscribed, from the admin there is possibility to sent crafted messages to all subscribers.
The plugin is a great, choice for anyone who is looking for quick install of Newsletter on WordPress without extra "config" complications.
Below is a quote describing email newsletter, taken from the plugin author webpage;
Advantage of this plugin
- Simple no coding required.
- Easy installation .
- Using this plug-in we can send email to all registered folks.
- Using this plug-in we can send email to all comment posted folks.
- Email subscribe box for front end
- Check box option available to select/unselect emails from the send mail list.
- Integrated the email newsletter plugin & simple contact form plugin
– Enabling the plugin is done via admin menus:
Plugins -> Inactive -> Email Newsletter (enable)
Afterwards, the plugin requires a quick configuration from wp-admin:
Email Newsletter -> Subscriber form setting
You see in the screenshot, the config where to place the plugin is trivial.
To make Email Newsletter appear on the pages, you will have to add the Email Newsletter widget from:
Appearance -> Widgets
The widget looks like the one in below screenshot:
Drag and drop the widget to the widgets pane. Onwards on the wordpress pages, should appear an email subsciption box:
Though Email Newsletter is great, it has one serious drawback, as it doesn't support Double Opt-In. Therefore people subscribing through it are not mailed with a request to confirm their email subscription request.
As a result, its very likely many spam-bots submit fake emails in the newsletter subscribe form and in 1 year time your newsletter email list might get full with tens of thousands unexistent emails. If you end up with this bad scenario, once newsletter emails are sent to (regular) exitent subscribers, many of the bulk emails in the list will never reach their senders, but will just fill-up the mail server queue and take up server resources for nothing for one week or so (depending on the email configuration keep undelivered mail setting).
Anyways, since the basis of this plugin works fine, I'm sure if the author modifies it to include a simple Captcha instead of double-opt functionality, the plugin can become top plugin.
Tags: administrator, ALO, Auto, bit, blog, business consultant, Cache, confirmation, confirmation url, description, download, Draft, e mail, email addresses, Feedburner, form, free newsletter, google, Install, job, job description, mail newsletter, marketing, newsletter, newsletter subscription, newsletter support, NewsletterAs, Opt, part time job, plugin, Plugins, quot, relay, something, spammer, specialist, subscriber, subscribers, subscriptions, support, system administrator, time, web developer, Wordpress, wp newsletter, writting
Posted in System Administration, Web and CMS, Wordpress | 3 Comments »
Monday, July 9th, 2007 The day went faster than normal other days. I wake up in the morning went to Church on Liturgy.Then I went home watched some Cartoon Network. Later I decided going to my uncle to read himthe bible for some time, but he was not home I take a watermelon from the local market for mygrandmother. It’s nice to see somebody being happy about something :]. Later i went to my uncle.It’s sad to see someone like in his condition :[. I really want he to get better I read himfrom the Bible The Holy Evangelic text of Luka, I hope at least he has understood somethingfrom the Evangelical Text. Habib called home from London later, this was a real joyHabib is such a nice guy i really want God to bless him in everyhing for he desirves.We spake a lot about the life in England. The bad conditions there, the low paid job,how hard he is living there. About how we miss as friends, about some close friends.After the conversation I decided to go out. I first went to the Mino’s coffee. There weresome people there but I got angry at the non-sense conversations and decided to go to theFountain actually there was almost the same. Later I Toto and Mitko drinked beer in thecity park. And I went home … After the usual Evening Orthodox Prayers I will go to bed in 20 or 30 minutes.END—–
Tags: Beer, bible, cartoon, cartoon network, close, close friends, coffee, conversation, conversations, end, Evangelic, Evening, god, habib, himfrom, home, job, life, life in england, liturgy, local market, london, luka, Mino, Mitko, mygrandmother, nice guy, orthodox prayers, someone, something, text, thecity, time, toto, watermelon
Posted in Everyday Life | No Comments »
Sunday, September 23rd, 2007 The last 3 days in the college we used to have a guest from the Arnhem Business Scholl: Job Thinke.He is a teacher in HRQM (Human Resource and Quality Management). We played a simulator. We choose abusiness to be in. Job, Bozhidar, and two graduating students from Arnhem ( one black girl and one guy from South Africa )were the teachers. We choose an industry (our group was some Open cars producing company). Every peson of the teamhad to participate in taking decisions and writting down the decisions in a decision forms every form was aboutmoney we would invest in things which would lead to accomplish a specific goals we had setted in the beginning of the game,things like hiring more employees promoting some of them etc. etc. were our work. The game was played 3 days and it waslike if we had run a 2 years long business. Our group mistake was that we always thought about things in short terms.In the end of the 2nd year of the game we had a discussion meetings with our higher level employees and it turns outthat we are the poorest team because we always thought about the company in short term instead of long term.During this 3 days there was also some funny games for developing concentration and thinking and improvingcommunication skills. In general I think the whole think was a great loss of time, but I’m a strange person …Most of the ppl liked involved from IBMS and Hotel Management liked the game very much.END—–
Tags: black girl, Bozhidar, college, concentration, decision, decisions, discussion, end, funny games, game, girl, hotel management, Human, human resource, ibms, improvingcommunication, industry, job, level, loss, Management, mistake, Open, open cars, outthat, person, peson, ppl, producing company, Quality, quality management, south africa, strange person, teamhad, Thinke, time, writting, year
Posted in Everyday Life | No Comments »
Friday, March 28th, 2008 I stand up in the morning at somewhere around 09:30. I made my physical excersises everyday. What I have to say that I’m trying to fast. You know it’s the orthodox fasting period. Orthodox Eastern has to be on 27 may if I’m not mistaken. In the morning we had Marketing II classes with a teacher called Stanislav. Nobody has a homework and only three of us entered the classes so the teacher was furious. After that we had lectures with Ruelof on the topic of Marketing Research. I had not much job from work. Our project manager said that they are going to give me a phone so they can reach me cheaper and easier. We have to had some English classes just after the Marketing Planning lectures but the teacher Valio said we won’t have it because he has some job to do. After the school I worked on the servers. Servers and stuff works just fine thanks to God. Unfortunately my health issues continue on and on. I’m starting to loose temper I try to pray for a little every night before I go to bed and every evening. I still hope God would hear me and heal me. Ahm what else in the evening I went to the 2nd hand furniture shop of my cousin Zlatina and her husband Ivailo I spend a little less than an hour there. After that I went to Yasho a colleague 1st year (A metal head and brother of one of my class mates) and we watched Dr. Strangelove together Or How I learned to stop worrying and drop the bomb. I really enjoy this Kubrick film :). That’s most of the day. I figure out that one of the qmail chkuser’s patch wasn’t working properly on one of the servers and I did some tweaks to make it work. Also I’m reading a little book on MySQL although I almost doesn’t have time to read it. Well that’s it Let’s call it a day.END—–
Tags: Ahm, bomb, brother, class mates, colleague, Cousin, doesn, dr strangelove, end, excersises, furniture, furniture shop, hand furniture, HEAD, health issues, homework, job, manager, marketing, marketing planning, marketing research, Metal, nobody, phone, pray, Qmail, Research, Ruelof, servers, shop, stanislav, temper, thanks to god, time, tweaks, Valio, year
Posted in Everyday Life | No Comments »
Friday, July 22nd, 2011 These days, I’m managing a number of OpenVZ Virtual Machine host servers. Therefore constantly I’m facing a lot of problems with users who run shit scripts inside their Linux Virtual Machines.
Commonly user Virtual Servers are used as a launchpad to attack hosts do illegal hacking activities or simply DDoS a host..
The virtual machines users (which by the way run on top of the CentOS OpenVZ Linux) are used to launch a Denial service scripts like kaiten.pl, trinoo, shaft, tfn etc.
As a consequence of their malicious activities, oftenly the Data Centers which colocates the servers are either null routing our server IPs until we suspend the Abusive users, or the servers go simply down because of a server overload or a kernel bug hit as a result of the heavy TCP/IP network traffic or CPU/mem overhead.
Therefore to mitigate this abusive attacks, I’ve written few bash shell scripts which, saves us a lot of manual check ups and prevents in most cases abusers to run the common DoS and “hacking” script shits which are now in the wild.
The first script I’ve written is kill_abusers.sh , what the script does is to automatically look up for a number of listed processes and kills them while logging in /var/log/abusers.log about the abusive VM user procs names killed.
I’ve set this script to run 4 times an hour and it currently saves us a lot of nerves and useless ticket communication with Data Centers (DCs), not to mention that reboot requests (about hanged up servers) has reduced significantly.
Therefore though the scripts simplicity it in general makes the servers run a way more stable than before.
Here is OpenVZ kill/suspend Abusers procs script kill_abusers.sh ready for download
Another script which later on, I’ve written is doing something similar and still different, it does scan the server hard disk using locate and find commands and tries to identify users which has script kiddies programs in their Virtual machines and therefore are most probably crackers.
The scripts looks up for abusive network scanners, DoS scripts, metasploit framework, ircds etc.
After it registers through scanning the server hdd, it lists only files which are preliminary set in the script to be dangerous, and therefore there execution inside the user VM should not be.
search_for_abusers.sh then logs in a files it’s activity as well as the OpenVZ virtual machines user IDs who owns hack related files. Right after it uses nail mailing command to send email to a specified admin email and reports the possible abusers whose VM accounts might need to either be deleted or suspended.
search_for_abusers can be download here
Honestly I truly liked my search_for_abusers.sh script as it became quite nice and I coded it quite quickly.
I’m intending now to put the Search for abusers script on a cronjob on the servers to check periodically and report the IDs of OpenVZ VM Users which are trying illegal activities on the servers.
I guess now our beloved Virtual Machine user script kiddies are in a real trouble ;P
Tags: admin job, bash scripts, bash shell scripts, CentOS, check ups, consequence, data, DDoS, Denial, denial service, download, host, host servers, job, kill, launchpad, Linux, log, malicious activities, network traffic, number, openvz, overhead, quot, script, script kiddies, Search, server overload, servers, Shell, shits, tcp ip network, tfn, ticket, trinoo, ups, Virtual, virtual machine, virtual machines, virtual servers, vm user
Posted in System Administration | 29 Comments »