Powered by Drupal

Intel AMT for IP KVM and Linux

Submitted by raf on Mon, 06/09/2014 - 22:37

Followed the directions in http://www.panticz.de/Intel-AMT-vPro-under-Linux, to enable direct VNC access (IP KVM like). Everything worked well while a monitor was physically connected.

However, once the monitor was no longer connected, Linux disabled all display output, and VNC only showed a black screen. Took some time to find the right kernel command line parameter to force output:


Note the "e", which force enables the output.

Single sign-on sudo

Submitted by raf on Wed, 03/24/2010 - 22:26

When I log in, I need to enter my password, and then when I want to sudo, I need to enter the same password again. Would it be possible to configure pam to use the log-in password to create a sudo timestamp?


pam_exec.so is a PAM module that can call an external program at any stage: auth, account, password and session. Via the expose_authtok it can provide the password on the programs stdin. So I added the following at the end of /etc/pam.d/common-auth:

Monitor the progress of cp/mv with lsof and Term::ProgressBar

Submitted by raf on Sat, 10/10/2009 - 19:35
Preparing for another move of large files, I was considering ways to see the progress of the file operations. Then I remembered that lsof includes the size of the open files in its output. I wrote a small Perl script that starts the file operation in another process, and then use lsof to monitor its progress. I used the size of the source and destination file to create a progress-bar. lsof can be run in repeat mode (-r), I combined this with the process id (-p) and the (known) read and write file descriptor (-d).
$ bar cp /data/cd.iso .
cd.iso:  75% [====================================    *        ]0m22s Left

sendmsg/recvmsg with Perl (on Linux)

Submitted by raf on Thu, 05/22/2008 - 09:29
sendmsg and recvmsg are not builtin in to Perl. The fact that they take complex structures is a good reason not to include it. But sometimes you want to do more complex things, for example pass filedescriptors over Unix sockets. CPAN has some modules (Socket::PassAccessRights and File::FDpasser), but they require you to compile code for each different platform. Can this be done in pure Perl? There are two problems to overcome: creating the iovec, msghdr and cmsghdr structures and initiating the syscalls.

Another nice switch?

Submitted by raf on Sat, 03/22/2008 - 18:35
I bought a Linksys SRW208G on eBay. It seems to be feature packed, I wonder if it is running IOS underneath. However, two things that I don't like: external power brick, and web interface is IE only... It can also be configured over serial, telnet or ssh; not command line but some text based menu system.