Category: linux

How to check how many threads does process have?

Just use -L switch for ps 😉

smeal@smeal:~$ ps -efL|grep -i sql
root 4601 1 4601 0 1 12:35 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql 4643 4601 4643 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4646 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4647 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4648 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4649 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4661 0 16 12:35 ? 00:00:04 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4662 0 16 12:35 ? 00:00:08 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4663 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4664 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4667 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 4721 0 16 12:35 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 11228 0 16 13:30 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 11473 0 16 13:30 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 15430 0 16 14:17 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 15431 0 16 14:17 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock
mysql 4643 4601 15432 0 16 14:17 ? 00:00:00 /usr/sbin/mysqld –basedir=/usr –datadir=/var/lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/run/mysqld/mysqld.sock

avi to DVD

short steps to make DVD from video

(if you have more files, you can join them accordiong: http://smealko.blogspot.com/2008/07/how-to-join-more-video-files-into-one.html

if needed install those packages before: mplayer videotrans dvdauthor mkisofs libxvidcore4)

movie-to-dvd -m pal movie.avi

mplex -f 8 -o movie.mpg movie.m2v movie.ac3

dvdauthor -o dvd/ -t movie.mpg

dvdauthor -o dvd/ -T

mkisofs -dvd-video -v -o movie.iso dvd

htc touch pro + ubuntu (should work for all PPCs)

sources:

# SYNCE
deb http://ppa.launchpad.net/synce/ubuntu hardy main
deb-src http://ppa.launchpad.net/synce/ubuntu hardy main

# Opensync

deb http://opensync.gforge.punktart.de/repo/opensync-0.21/ sid main
deb-src http://opensync.gforge.punktart.de repo/opensync-0.21/ sid main

packages to install:

multisync-tools multisync0.90 opensync-module-python opensync-plugin-evolution opensync-plugin-google-calendar opensync-plugin-synce python-opensync synce-gnomevfs synce-gvfs synce-hal synce-sync-engine synce-trayicon

reboot and run: synce-trayicon (or add to auto started processes in your X session)
ps: sometimes module ipaq is needed (sudo modprobe ipaq)

self signed psx certificate

openssl genrsa -des3 -out server.key 4096

openssl req -new -key server.key -out server.csr

openssl x509 -req -days 999 -in server.csr -signkey server.key -out server.crt

openssl rsa -in server.key -out server.key.insecure

mv server.key server.key.secure

mv server.key.insecure server.key

cat server.crt server.key > server.pem

openssl pkcs12 -export -in server.pem -out server.pfx