piątek, 25 kwietnia 2008

reinstalacja zabbixa

Po przeniesieniu zabbixa
w logach pojawiał się błąd :
cat: write error: Broken pipe

rozwiązanie:
chown root:zabbix /usr/sbin/fping
chmod 710 /usr/sbin/fping
chmod ug+s /usr/sbin/fping

w zabbix_server.conf
#FpingLocation=/usr/sbin/fping

środa, 9 kwietnia 2008

przypisywanie mac do adresu ip skryptem

REM @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
REM @@Skrypt sprawdza IP - jeżeli odpowiada to sprawdza @@
REM @@adres MAC @@
REM @@Copyright by Piotr Kurzeja 2008 @@
REM @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

set klasa=192.168.1
set n=254
set ip=1


:loop
if %ip% GEQ %n% goto end

ping -n 1 %klasa%.%ip%
if %ERRORLEVEL%==0 arp -a %klasa%.%ip% >> ip.log
set /A ip=ip+1
goto loop
:end

wtorek, 8 kwietnia 2008

Setting up you own mirror - OPENSUSE

If you have several openSUSE machines and/or less that full broadband it may be wise for you to set-up your own installation and update source. I have and Yast performance has greatly improved. Also a network install has become my preferred installation method. The following is what I did to set-up my mirror for openSUSE10.2.

Requirements:
apache web server
rsync
local network (preferably having a DHCP server )
40Gig min disk space, 50G or more recommended

Note: I use /home/mushroom/public_html/ for all my web pages if you use a different path you will have to adjust the all the quoted parts to your directory structure, do not include the quotes. and the IP address of the local machine I use is 192.168.0.81 replace this with the address you will be using.

1.Create the directories on apache to match the ones you plan to mirror, in my case they where
1. "/home/mushroom/public_html/opensuse/distribution/10.2/repo/debug"
2. "/home/mushroom/public_html/opensuse/distribution/10.2/repo/oss"
3. "/home/mushroom/public_html/opensuse/distribution/10.2/repo/non-oss"
4. "/home/mushroom/public_html/opensuse/distribution/10.2/repo/src-non-oss"
5. "/home/mushroom/public_html/opensuse/distribution/10.2/repo/src-oss"

Space required about 35G, I took the CD's or DVD I had already burned and pre-seeded the directories, no point in downloading what I already had. To complete the opensuse directory I ran the comand.

"rsync -v -a --delete rsync://mirrors2.kernel.org/mirrors/opensuse/distribution/10.2/repo/ /home/mushroom/opensuse/distribution/10.2/repo"

This step can take quite a while but you only have to do it once per distribution.

Now I am able to do http network installs using a min.iso by putting in the IP address "192.168.0.81" and a directory of "opensuse/distribution/10.2/repo/oss" By checking the box Addon Media during the installation I am also able to add "192.168.0.81" + "opensuse/distribution/10.2/repo/non-oss" and get a complete install.
After the installation I can add http installation sources "192.168.0.81" + "opensuse/distribution/10.2/repo/src-non-oss", "192.168.0.81" + "opensuse/distribution/10.2/repo/src-oss", "192.168.0.81" + "opensuse/distribution/10.2/repo/debug"

2. Next I created the directories needed for up-dates
"/home/mushroom/public_html/suse/update/10.2"
Space required at this time 2.4G and growing to populate the directories I ran the comand
"rsync -v -a rsync://mirrors2.kernel.org/mirrors/suse/update/10.2/ /home/mushroom/suse/update/10.2"

I can now add a http installation source IP address "192.168.0.81" and a directory of "suse/update/10.2" and update all my machines locally. To keep it up to date I run a daily crontab
"4 4 * * * rsync -q -a --delete rsync://mirrors2.kernel.org/mirrors/suse/update/10.2/ /home/mushroom/suse/update/10.2"

3 . Next (optional) I created the directories needed for Packman as I like mplayer and a few other things found on there. Space required 8.2G and growing.
"/home/mushroom/public_html/packman//suse/10.2"
and populated it with the comand
"rsync -v -a rsync://packman.mirrors.skynet.be/packman/suse/10.2/ /home/mushroom/packman/suse/10.2"
and keep it updated daily with a crontab
"6 6 * * * rsync -q -a –delete rsync://packman.mirrors.skynet.be/packman/suse/10.2/ /home/mushroom/packman/suse/10.2"
This gives me a local http packman source that I can to my installation sources the IP address "192.168.0.81" and a directory of "packman/suse/10.2"

Done.
Advantages
1.Yast software management and Yast online update is faster and never hangs as it does not need to connect to the outside world.
2.Depending on the number of machines you have there can be an over all bandwidth savings
3.Once set-up needs little or no maintenance.
4.Allows for a completely updated network installation using no bandwidth
5.Add/remove software does not require you to insert a CD/DVD.
6.The method could be modified to use a portable hard drive to service machines with no internet or slow internet connections
7.Rysnc sources are not always easy to find.

Disadvantages
1.Takes a lot of bandwidth to set-up.
2.Takes a lot of hard drive space.
3. You may be as much as 24 hours behind on updates, you can update more often, there is a slight increased use of bandwidth doing so.

piątek, 4 kwietnia 2008

optymalizacja f-secure na serwerach terminali

W nawiązaniu do rozmowy telefonicznej, zamieszczam poniżej sposób na wyeliminowanie zbędnych procesów z wątków użytkownika na serwerach terminalowych:

Here is the workaround for your problem.

---------------------

The FSM32.exe starts to every Terminal session under the username that created the session. FSM32.exe is needed for the GUI and to run manual scanning, but in environments that has many sessions the FSM32.exe's takes quite a bit of memory.

Workaround for this:

1. Delete the "F-Secure Manager"=""C:\Program Files\F-Secure\Common\FSM32.EXE" /splash" key under [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]

2. Add a shortcut "C:Program FilesF-SecureCommonFSM32.EXE" to Start -> Programs -> Startup to users that should start the FSM32.exe (GUI) or it can be added to login-script.

Also 5.52 should have the "AUA data already in use" fix, as it also comes for every user. This also can be workarounded like this:

1. Open the C:Documents & SettingsAll usersStart MenuProgramsStartup 2. Cut the "F-Secure Automatic Update"

3. Paste it to C:Documents & SettingsStart MenuProgramsStartup

That also prevents the AUA GUI starting to every user (which causes the "AUA data already in use"-dialog)

In Terminal sessions "F-Secure Automatic Update" won't run in the processes, but FSM32.exe seems to be starting it.

VmWare error 10001

  1. jezeli serwer esx przeszedł w stan awarii - w logach wskazywał error 10001 Instance already exist - nie pomagały restarty maszyny. Trzeba było przeładowac serwis :
service mgmt-vmware restart