Wednesday, February 5, 2014

Vmware Notes (I)

Recently, I have been reading a little bit about Vmware, usually, I am Hyper-V guy, but probably in a short time I am going to work with Vmware.
I have been doing a little bit of research about Vmware and here are some notes that I have taken/pasted about this topic.
This article, doesn't cover all topics regarding Vmware, probably I will write a second article where I will extend it.
I hope these notes will be useful to you.

Saturday, December 28, 2013

When use PCL or PS printer drivers

Today we are going to talk about a topic that at first glance seems not interesting, printing performance.

At our office we've faced this problem as well as some clients asked us about slow performance printing PDF files through one our products.

The problem: 
After a new coorporative printer/drivers deploy, end users complaint about very slow printing when they print PDF medium size files and terribly slowness with large files.

Sunday, December 15, 2013

Wsus report with powershell


Last Tuesday, someone in our department asked us if it is possible to get a report via email that displays information about failed computers.

By default Windows 2008 R2 does not provide WSUS cmdlets, so we need to load WSUS assemblies from .NET, here is a URL with the method and properties http://msdn.microsoft.com/en-us/library/microsoft.updateservices.administration(v=vs.85).aspx

Recipe: IAS log parser

Today we need to parse an IAS log, we need to know who are logging in the system. Usually we use IASLogparser, but unfortunately in this case we did not have the license.
So, we need to read the file specifications from Microsoft in this URL http://technet.microsoft.com/es-es/library/dd197432(v=ws.10).aspx  and parse the log file.
We selected Powershell as our script language and it was easy to build a parser, we made it in less than one hour.

Thursday, November 28, 2013

Recipe: Linux SNMPD script OID & Cacti example ( VSFTD number of users )

Today we have to implement a new chart in our Cacti, this chart has to display the number of users connected to a VSFTPD server in a CentOS server.

VSFTPD CONFIG
Firstly, you have to setup VSFTD to display the number of connections, to do this, you have to add this variable setproctitle_enable=YES in the vsftpd.conf file and restart the service.
This setting allows you to monitor the clients, now you can see the connection in the output of ps command, in this case the output looks like this:
vsftpd_daemon_user 11203  1.0  0.3  56320  1548 ?        Ss   15:12   0:00 vsftpd: 90.IP.IP.IP: connected
Counting the number of connections is very easy, one script like this is enough:
 #!/bin/bash  
 ps aux | grep vsftp | grep connected | wc -l  
It will return the number of the connected users.
We are going to save it as /scripts/ftp-who.sh to use it in the next examples.
Now is time to integrate it on SNMPD config.

Wednesday, November 27, 2013

Recipe: How to know when was the last update in Linux

Today we are going to write about the difference between the two main package managers. Last week we were setting up some systems to be ready for ISO 27000 audit and we needed to know when the last updates were installed in  Linux servers. We have two types of Linux distributions in the company, Debian and CentOS, we think that CentOS is more enterprise friendly, especially the package manager (yum) is more enterprise friendly than dpkg and here is an example.

In CentOS you need to execute the command yum history to get a report of the last software installed in the machine. In Debian on the other hand, you need to execute something like this, date -d @$(stat -c %Y /var/cache/apt/) and it just return the last day when apt-get installed a package, it looks more tricky and it is not a function of dpkg.

This kind of details, like update history, are very important to us because they are very annoying in day by day operation, so we strongly recommend CentOS instead of Debian for enterprise systems.