sysadmin

From Sys Admin to programmer?

Hi all, I've been working with computers for nearly 30 years (started out coding BASIC on a PET, then 6502 onto 68000 and C). I later gained a CompSci Degree and continued programming, moving into databases (DBA) and I've spent the last 10 years to present day as a Unix Sys Admin. I spent the last couple of years writing java for a ...

Calling JMX MBean method from a shell script

Are there any libraries that would allow me to call a JMX MBean method from a shell script. We expose some operations/admin commands through JMX, and we could have our admins use JConsole, or VisualVM, but some tasks are better left to automation. In that automation we'd like to be able to call a JMX MBean method on our running server, p...

Filter function for less +F

When watching a growing log file with e.g. "less -iS +F service.log" I want to limit the display to lines matching a certain pattern. I tried something like less +F service.log | grep <pattern> | less +F which doesn't work. Also cat < service.log | grep <pattern> | less +F doesn't do what I want. It looks like the input is already...

Change MySQL innodb_buffer_pool_size at runtime?

This may be a dumb question, but is it possible to change the MySQL configuration options such as innodb_buffer_pool_size at runtime? Or, equivalently, is there a way to reload MySQL without closing existing connections or refusing new connections (like you can do with Apache)? Linux_32 (2.6.26) + MySQL 5.0.24a ...

How to handle new files to process in cron job

How can I check files that I already processed in a script so I don't process those again? and/or What is wrong with the way I am doing this now? Hello, I am running tshark with the ring buffer option to dump to files after 5MB or 1 hour. I wrote a python script to read these files in XML and dump into a database, this works fine. My ...

Why use Apache over NGINX/Cherokee/Lighttpd?

Apache has been the de facto standard web server for over a decade, but recent years have brought us web servers that consume less RAM and handle many more requests per second using fewer threads and asynchronous i/o. In my opinion, I also find the configuration of these servers to be more straightforward and minimal. Why do people use ...

mysqld-nt.exe exist in task list,but actually it's not running?

Have you ever step into this kind of problem? I tried: telnet localhost 3306 And it fails to connect. I can see mysqld-nt.exe in the task manager(I'm using windows platform). So I restarted the server,and it's ok. This happens every day. Any ideas? EDIT Here is the error log(I didn't find anything abnormal though): 100122 10...

Apache 2 Administration Tools on Ubuntu or Windows

Hi There... I am totally new to Apache and Ubuntu, is there an admin tools where the available functions and features and settings are more accessible? I am finding it very difficult to do even the simplest things.... please help. Cheers. ...

Execution of python scripts like udev/rules.d, cron.d or /apt/source.d ....

I use python to patch system settings of linux systems distributed with partimage. I want to have the following python script structure: /patch.d/ 10_patch_netwok.py 20_patch_hostname.py ... 50_patch_software_xyz.py InitSystem.py The InitSytem.py should run the python scripts in /patch.d folder. Following my idea (br...

Whats the best way to crawl a batch of urls for a specific html element and retrieve the image?

I'm looking to crawl ~100 webpages that are of the same structure, but the image I require is of a different name in each instance. The image tag is located at: #content div.artwork img.artwork and I need the src url of that result to be downloaded. Any ideas? I have the urls in a .txt file, and am on a mac os x box. ...

Sharepoint W3WP.EXE Process Consuming 100% CPU - Corrective Action?

We have a Windows Server 2003 web server, and on that server runs about 5-6 top level Sharepoint sites, with a different application pool for each one. There is one W3WP process that keeps pegging 100% for most of the day (happened yesterday and today) and it's connected (found by doing "Cscript iisapp.vbs" at the command line and match...

How can I determine the type of SVN repository I have?

How can I determine the type of file system that is used by a given SVN repository? I want to create a new repository with svnadmin but want to make sure I am creating my new repository with consistent settings to other repositories already on the server. I dont want to setup a berkley db repository if all the others are FSFS on the sy...

Compiling PHP 5.1.6 from source - php -v and phpinfo() version discrepancy

Hi, I have just bought a VPS running Ubuntu and I need to install the LAMP stack with PHP 5.1.6. The VPS came with no PHP installed (checked this from the shell with php -v) and with Apache/2.2.12 installed. I installed PHP 5.1.6 from source and compiled it with Apache 2.2 (using libapache2-mod-php5), tried a phpinfo() test which worked ...

A programmatic way to discover the number of CPUs and spec for each CPU/Core in Ubuntu Karmic?

A programmatic way to discover the number of CPUs and spec for each CPU/Core in Ubuntu Karmic? Bash or C/C++, Python, Perl are fine. Thanks! ...

Troubleshooting source of heavy resource-usage on a server 2008 running multiple sites

Hi, I am running about 10 asp.net websites on a hosted virtual server. The server runs Server 2008 - each website is backed by its own database running on SQL server 2008 on the same box. Lately the box has seemed really slow. The only kind of discovery i could think of doing was looking in the task manager, where i can see w3wp and sq...

(Windows) How to lock all applications (explorer, task manager etc.) and make only the browser active?

I'm trying to run only the browser in the system - locking access to everything else. Only the supervisor can resume the normal functioning of the system after giving a password. This kind of activity is usually done by virus. Disabling the registry for Task manager etc. Does anyone know of any source available that does this? I might b...

Are Apache Environment Variables "request safe"?

I have my Apache web server fronting a Rails application. When a request comes in one of the Apache modules looks at the request and puts information into an Apache environment variable. My question is, is there a chance that one request can overwrite the environment variable of another request and have things get mixed up in the Rails l...

windows service cannot access a webservice

Hi We have two servers, both are containing a local application connecting to local web service, applications and services are identical on both servers. One of the servers work just fine, The other one is just dead, I have impression the the security configuration are different on those servers. What prevents an application X from c...

AIX: lsdev vs lspv

Hi guys, I'm using AIX and today I had a problem with one IBM server, I found that one of my hdisks was damaged. But I found a curisoity: $lspv hdisk0 000d891c32aae9b6 active hdisk1 000d891cb504fd70 active hdisk2 000d891cb532544d active hdisk4 000d891cb532544d active $lsdev -Cc disk hdisk0 Availabl...

monitor and kill runaway processes using 100% IO?

Hello everyone, i have a few processes that have to be run at high priority (chrt 98) that will occasionally decide to hard-lock and peg 1 core at 100% (not a huge deal) but more importantly it will use all the IO on a system, so much that its impossible to log into the machine via ssh to kill it or perform any task on the machine that i...