In order to debug some PHP session problems on Debian, I needed to check the count of existing session files. When PHP is compiled from source usually, by default sessions are stored in /tmp directory, however this is not the case on Debian.
Debian’s PHP session directory is different, there the sessions are stored in the directory:
/var/lib/php5
I’ve discovered the session directory location by reading Debian’s cron shell script, which delete session files on every 30 minutes.
Here is the file content:
debian~# cat /etc/cron.d/php5
# /etc/cron.d/php5: crontab fragment for php5
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime
# Look for and purge old sessions every 30 minutes 09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete
To check the amount of existing PHP opened session files:
Many of us have already taken advantage of the powerful Rsync proggie, however I'm quite sure there are still people who never used rsync to transfer files between servers.. That's why I came with this small post to possibly introduce rsync to my blog readers. Why Rsync and not Scp or SFTP? Well Rsync is designed from the start for large files transfer and optimized to do the file copying job really efficient. Some tests with scp against rsync will clearly show rsync's superiority. Rsync is also handy to contiue copying of half copied files or backups and thus in many cases saves bandwidth and machine hdd i/o operations.
Where remoteuser@remotehost — is the the username and hostname of remote server to copy files to. /remote/directory — is the directory where the rsync copied files should be stored /local/directory — is the local directory from which files will be copied to remote directory
If not a preliminary passwordless ssh key (RSA / DSA) authentication is configured on remote server, the above command will prompt for a password otherwise the rsync will start doing the transfer.
Even though dpkg –purge was invoked /var/lib/vnstat/ refused to be removed since it contained vnstat’s db file eth0
Therefore I deleted by hand before installing again vnstat:
debian:~# rm -rf /var/lib/vnstat/
Tried installing once again vnstat “from scratch”:
debian:~# apt-get install vnstat
...
After that I tried regenerating the vnstat db file eth0 once again with vnstat -u -i eth0 , hoping this should fix the error but it was no go and after that the error:
debian:~# vnstat --hours eth0: Not enough data available yet.
persisted.
I checked in Debian bugs mailing lists and I found, some people complaining about the same issue with some suggsetions on how the error can be work arouned, anyways none of the suggestions worked for me.
Being irritated I further removed / purged once again vnstat and decided to give it a try by installing vnstat from source As of time of writting this article, the latest stable vnstat version is 1.11 . Therefore to install vnstat from source I issued:
debian:~# cd /usr/local/src
debian:/usr/local/src# wget http://humdi.net/vnstat/vnstat-1.11.tar.gz
...
debian:/usr/local/src# tar -zxvvf vnstat-1.11.tar.gz
debian:/usr/local/src# cd vnstat-1.11
debian:/usr/local/src/vnstat-1.11# make & make all & make install
debian:/usr/local/src/vnstat-1.11# cp examples/vnstat.cron /etc/cron.d/vnstat
debian:/usr/local/src/vnstat-1.11# vnstat -u -i eth0
Error: Unable to read database "/var/lib/vnstat/eth0".
Info: -> A new database has been created.
As a last step I put on root crontab to execute:
debian:~# crontab -u root -e
*/5 * * * * /usr/bin/vnstat -u >/dev/null 2>&1
This line updated vnstat db eth0 database, every 5 minutes. After the manual source install vnstat works, just fine 😉
I’m watching iGenius – How Steve Jobs changed the World movie. I heard about a movie from Alex a friend of mine who said this movie sheds some light on history of Apple Computers Inc, Macintosh and the great significance of Steve Jobs work as a manager and visionary to change the world for good. The world has suddenly been astonished by Steve Jobs sudden death so surely the interest about him is tremendously up.
I do respect Jobs as under his leading the computer industry has received some innovations, still I don’t agree with many of the movie aspects which turn Apple and the consequent company products IPhone, Ipad, Ipod etc. into a mega hype products. I’m being honest to myself and I should say many of the innovations they did are not something too much, but just a product which popularized or minituarized some older invented technology.
The product quality of Apple in the past is a fact so one cannot argue with this however with recent years I wouldn’t say the company quality is so much supreme as presented in the movie. What I don’t understand why is Jobs receiving so much praise and recognition but rarely somebody could show his bad sides as well. We’ve been again manipulatively mislead that he is a mega genius or like an angel on earth. However the achievements of Apple and the mass production and involvement of the field of marketing which lies basicly and makes profits based on great deceptions of Jobs doesn’t make Jobs to a super hero. As an enterpreneur and businessman his achievements are unquestionable but for many years now the reality of business is sad and a honest man could rarely be found to be dealing with business. Usually the people who like dirt, lies and fame are into business. Most of the times these are people who are ready to kill in the name of Public Recognition and Success. Jobs has been said to be a Buddhist according to what I’ve red in Wikipedia. If that is true its rather strange to me on fruits his buddhist faith produced. I don’t believe that any rational man who observes nowdays technology and how it is used doesn’t see the great harm technology did us and is continuously pushing us down. Buddhist teachings in my view teach on helping the neighbor educating and giving up things for free. Apple products however are not giving anything for free, yes some of them do education. Therefore in my view the philosophy of apple and its application is not really fitting up to helping the neigbor as they don’t come free of charge like the free software does. Apple products actually enslaved their users, all of apple products are nowdays connected to Apple’s Inc. Mega Corporation IStore or they report somehow to apple during updates or purchases more or less about users likings or behaviours. This obviously doesn’t respect users freedom and makes Apple an example of a company that doesn’t respect completely the user natural right of freedom and privacy.
To sum it up iGenius – Or How Steve Jobs changed the World is a highly manipulative movie just like most of the movies or books dedicated to super heroes are. Steve Jobs was lucky to get this recognition and status in life, however this doesn’t make him too much different from all of us. He just used to be in the right time in the right place and achieved what he did explicitly by God’s mercy. As a known fact Jobs was an Orphan and as we can see from many life examples God helps and has helped many orphans to have a good lives eventually.
Also I’m quite curious if Steve Jobs success was just a fruit of his good fortune or there were just too many circles of people behind him (Jewish or Masonry) possessing big fortunes who found it practical to sponsor his (??) products and ideas seeing a lot of potential to keep the world under siege through technology. Nomatter what the complete true behind Jobs and his achievements are, he is still an inspirational person and an “icon” in the field of IT. Even I’m a bit Jealous on his overall achievements. Anyways for people who want to loose some approximately 42:00 minutes on a hype Jobs praise movie and see some of apple’s products and pictures of Jobs and Apple / Macintosh products the movie is a good choice 😉
I've gathered a collection of 15 Audio and Video songs dedicated to the Free Software / Open Source movement . All of the songs are based on the The Free Software Song Anthem written by Richard Mathew Stallman in the year 1991. The motive of the song is a Traditional Bulgarian song called Sadi Moma Bqla Loza – translated to bulgarian to something like Maid is Planting white Vines The original Free Software Song symbolizes all free software and the Free Software Movement and GNU and is in the Bulgarian unique / specific folk rhythm of 7 / 8 beats .
Most of the songs which I post hereby could also be found and downloaded from GNU's official Free Software Song page However some of the songs were only available from Youtube in the non-free format Flash Video (flv) . Hence, since the songs were dedicated to Free Software and apparently were being spread in a non-free format they either was missing any licensing or licensed under GFDL – free music / art GNU like license. To fix up this irragularity and add some freedom in terms of audio format of spreading, I've downloaded them and used ffmpeg2theora to convert the songs to the Free / Open Standard format Ogg Vorbis I'm quite sure that many people, who use Ubuntu or Linux Mint are pretty much unfamiliar with the Free Software Songs existence, also many people most likely have never heard the Free Software Songs or even those who heard it have rarely heard more than 2 or 3 of the song variations. Hereby, I'm sure many people who are lovers of Free Software will highly benefit and get inspired to continue in the Free Software by listening to these post shared little Free Software Song Collection .
The covers of the Original version publicly sang by Richard Stallman are in different musical genres, some of the song performances are in Folklore, played on Piano other covers are performed by musical bands in pop / punk en popular music styles, there are one person performances, cheerful christmas like soundings, 8 bit free software song, Metal free software variations etc. In the collection I've included also few other nice songs which are propaganda on free software, even though not a cover of the Free Software Song , I found them myself worthy to be included in the collection..:
Herein you can download or listen all the Free Software Songs version (Enjoyment is guaranteed! 😉 ):
I was looking for a way to convert some Video and Sound files, downloaded from Youtube (mostly things dedicated to free software) and as far as I looked online unfortunately these pieces of nice music and tutorials are not available for download anywhere else or at least not available for download in some of the Open / Free Format (OGG Vorbis or OGV (OGG / Theora Video).
When it comes to convertion between different formats, always the first things that I think of is ffmpeg or mencoder , however I was not sure if some of this tools are doing the trick so I did a quick research online if there is some specialised console or GUI program that can do the convertions between MP4, FLV etc. to OGV.
In less than 10 minutes I found a threat mentioning about ffmpeg2theora – A Simple Convertor to create Ogg Theora files
As I’m running Debian GNU / Linux, I installed ffmpeg2theora straight via apt, according to some reports online ffmpeg2theora cmd convertion tool is also available straight from repositories on Ubuntu as well. On FreeBSD there is a port /usr/ports/multimedia/ffmpeg2theora available for install. Of course FFmpeg2Theora can be installed from source on other Linux distributions that might be missing a pre-built binary.
Using ffmpeg2theora to convert some kind of non-free video format is very simple, though the tool provides quite a numerous options for all those who want to have some customization for the video to be converted. To convert the flash file “The Gnu Song.flv” for example to The Gnu Song.flv , I invoked ffmpeg2theora like this:
debian:~# ffmpeg2theora "The Gnu Song.flv"
...
The conversion took few minutes of time, as my machine is not ultra powerful and apparently the conversion to OGV format is not too quick but the good news is it works. After the conversion was completed I used ogginfo to check the information about the recent converted file The Gnu Song.flv , below you see the file info ogginfo returns
debian:~# ogginfo The Gnu Song.ogv
Processing file "The Gnu Song.ogv"...
New logical stream (#1, serial: 5d65413f): type skeleton New logical stream (#2, serial: 0570412d): type theora New logical stream (#3, serial: 7e679651): type vorbis Theora headers parsed for stream 2, information follows… Version: 3.2.1 Vendor: Xiph.Org libtheora 1.1 20090822 (Thusnelda) Width: 320 Height: 240 Total image: 320 by 240, crop offset (0, 0) Framerate 25/1 (25.00 fps) Aspect ratio undefined Colourspace: Rec. ITU-R BT.470-6 Systems B and G (PAL) Pixel format 4:2:0 Target bitrate: 0 kbps Nominal quality setting (0-63): 32 User comments section follows… ENCODER=ffmpeg2theora-0.24 Vorbis headers parsed for stream 3, information follows… Version: 0 Vendor: Xiph.Org libVorbis I 20101101 (Schaufenugget) Channels: 1 Rate: 22050 Nominal bitrate: 30.444000 kb/s Upper bitrate not set Lower bitrate not set User comments section follows… ENCODER=ffmpeg2theora-0.24 Logical stream 1 ended Theora stream 2: Total data length: 1525324 bytes Playback length: 2m:41.360s Average bitrate: 75.623401 kb/s Logical stream 2 ended Vorbis stream 3: Total data length: 646729 bytes Playback length: 2m:41.384s Average bitrate: 32.059041 kb/s
ogginfo is a part of a package installed under the name vorbis-tools, vorbis tools also contains a few other helpful tools, whether operations with OGV or OGG file formats are at hand, the complete binaries vorbis-tools contains on Debian as of time of writting this post is:
ogg123 is a player for ogg files, however as far as I’ve tested it it doesn’t work too well. And just to compare ogg audio files were played just nice using the play command. oggenc is used to encode ogg audio file, based on a stream haneded to it from other audio encoded stream (let’s say mp3). Hence oggenc can be used to convert mp3 files to ogg audio files , like so:
oggdec is used to convert to wav files or raw PCM audio, whether; vcut is used to cut ogg video file on parts. vorbiscomment and vorbistagedit is used to edit information on already existing ogg audio files
There is also a GUI programmer for people who doesn’t want to bother with writting on the command line called oggconvert . OggConvert is written for GNOME and uses GTK gnome library, here is how the program looks like:
It took me like 1 hour of search on the Internet and looking through forum threads and sites to properly install all the hardware. In hope to help someone out there looking to install the hardware Window drivers on ATI RAdeon HD 2600 XT, I’ve made a small archive of all the drivers necessery to make the Video card , Sound Card and Ethernet be properly installed and operating.
Installation of the drivers on Windows is pretty straight forward download the ATI Radeon HD 2600 XT archive extract and install each one of the files contained in the archive. A few restarts will also be necessery after some of the installed drivers to make the drivers work.
ATI Catalyst (included in the archive) will install the Video drivers for the Radeon XT 2600, whether AD1988AB_Audio_V6585_XpVistaWin7 and 11-11_xp32-64_hdmiaudio will install the Audio drivers. Attansic_L1_Lan_V1737907_V10560011159 contained in the archive needs to be extracted and installed to make the Attensic L1 Gigabit ethernet to show up as installed hardware in Windows device manager.
Hope this post will save some time to ppl looking to install the same drivers on XP 😉 Cheers 😉
/dev/cdrom is the location of the cdrom device, on many Linuces including (Debian) /dev/cdrom is just a link to the /dev/ which corresponds to the CD drive. Note on FreeBSD the location for the CD Drive is /dev/acd0 /tmp/mycd.iso instructs dd CD image creation to be placed in /tmp/ directory. bs argument instructs it about the byte size portions by which the content of the CD-Drive inserted CD will be read. bs value of 2048 is actually only 2KB per dd read, increasing this value will decrease the time required for the CD image to be extracted.
2. Prepare CD image file to be ready for burning
After dd completes the image copy operation, next to prepare the extracted image / ISO to be ready for burning mkisofs is used:
# mkisofs -J -L -r -V TITLE -o /tmp/imagefile.iso /tmp/mycd.iso
The -J option makes the CD compatible for Pcs running Microsoft Windows. The -V TITLE option should be changed to whatever title the new CD should have, -r will add up status bar for the mkisofs operation. -r is passed to create specific file permissions on the newly created CD, -o specifies the location where mkisofs will produce its file based on the CD image /tmp/mycd.iso .
3. Burning the mkisofs image file to a CD/DVD on GNU / Linux
I'm rescuing some files from one unbootable Windows XP using a livecd with Hirens Boot CD 13
In order to rescue the three NTFS Windows partitions files, I mounted them after booting a Mini Linux from Hirens Boot CD.
Mounting NTFS using Hirens BootCD went quite smoothly to mount the 3 partitions I used cmds:
# mount /dev/sda1 /mnt/sda1
# mount /dev/sda2 /mnt/sda2
# mount /dev/sdb1 /mnt/sdb1
After the three NTFS file partitions are mounted I used smbclient to list all the available Network Shares on the remote Network Samba Shares Server which by the way possessed the NETBIOS name of SERVER 😉
As I a person who values highly love between man and woman and believes in true love between man and woman under God’s providence I really enjoyed The Notebook and I recommend it to everyone out there looking for true love. The movie gives a good example that one can experience great love. This is a fresh breath for me as I’m surrounded by dozens of people who does concentrate too much about the fleshly pleasure and forget that the essence of love is not in the flesh but in the love between man and woman’s spirit and soul. The Notebook is a record of one true love story between a man and wife who went through love, hate long time separation, regret broken heart, loss of path in life, fading love and then after a long time of being away of each other burning love again. It tells the story of a man and wife who loved so much that they get old together a story of true dedication and lasting love. Watch the movie you will certainly not regret it.
How rescue unbootable Windows PC, Windows files through files Network copy to remote server shared Folder using Hirens Boot CD
Saturday, November 12th, 2011I'm rescuing some files from one unbootable Windows XP using a livecd with Hirens Boot CD 13
In order to rescue the three NTFS Windows partitions files, I mounted them after booting a Mini Linux from Hirens Boot CD.
Mounting NTFS using Hirens BootCD went quite smoothly to mount the 3 partitions I used cmds:
# mount /dev/sda1 /mnt/sda1
# mount /dev/sda2 /mnt/sda2
# mount /dev/sdb1 /mnt/sdb1
After the three NTFS file partitions are mounted I used smbclient to list all the available Network Shares on the remote Network Samba Shares Server which by the way possessed the NETBIOS name of SERVER 😉
# smbclient -L //SERVER/
Enter root's password:
Domain=[SERVER] OS=[Windows 7 Ultimate 7600] Server=[Windows 7 Ultimate 6.1]
Sharename Type Comment
——— —- ——-
!!!MUSIC Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Canon Inkjet S9000 (Copy 2) Printer Canon Inkjet S9000 (Copy 2)
D$ Disk Default share
Domain=[SERVER] OS=[Windows 7 Ultimate 7600] Server=[Windows 7 Ultimate 6.1]
Server Comment
——— ——-
Workgroup Master
——— ——-
Further on to mount the //SERVER/D network samba drive – (the location where I wanted to transfer the files from the above 3 mounted partitions):
# mkdir /mnt/D
# mount //192.168.0.100/D /mnt/D
#
Where the IP 192.168.0.100 is actually the local network IP address of the //SERVER win smb machine.
Afterwards I used mc to copy all the files I needed to rescue from all the 3 above mentioned win partitions to the mounted //SERVER/D
Tags: admin, admin c, boot cd, bootcd, Canon, canon inkjet, cd 13, Comment, copy, default, default share, Disk, domain, domain server, drive, hirens boot cd, ip, livecd, local network, location, machine, Master, Mini, mini linux, mnt, mount dev, music disk, nbsp, netbios, netbios name, network ip address, network shares, NTFS, os windows, partitions, password, printer canon, Printer Canon Inkjet S9000 Copy, Remote, remote admin, remote server, rescue, root, samba shares, sda, sdb, Server Comment, server os, server windows, Sharename, unbootable, Windows, windows files, windows pc
Posted in Everyday Life, Linux, System Administration, Windows | 1 Comment »