Pages

Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Friday, November 10, 2017

Getting stats from dd -command

While trying to move the contents of one partition to another I used the dd -command like this:
(DO NOT cut'n'paste this command)

dd if=/dev/sda7 of=/dev/sda1

Here's how to get the progress of a long dd-copy:
  1. Open up a terminal (T1) and run your dd-command.
  2. Open another terminal (T2) by pressing Ctrl+Shift +T
  3. In terminal T2 type in: ps aux | grep dd
  4. Find the Pid for the dd-command
  5. In terminal T2 type: kill -USR1 <pid>
  6. Go back to T1 to see the stats printed.

Repeat points 5 and 6 to keep getting an update.

Friday, March 13, 2015

LVM Snapshot example

If your Linux is using LVM (Logical Volume Management) testing out or setting up can be much safer if you take a snapshot of your root partition. Here's a small but helpful example to help you do this quickly.

Friday, March 7, 2014

Cleaning out linux-image-x.x.xx-xx-* files

I was suddenly denied access to my in-house web-server with a message telling me the disk is full. After a quick check with df -h I could confirm the root partition used 100%.
First I started to look for "user -files" I could remove, but found out there wasn't all that many of them. Most of the usage was in the folders /lib, /usr and /var. A quick question to my friend google took me in the direction that there could be some linux-image files no longer used that were spending my disk.
Some more searching gave me the following solution to removing these unused kernel files:

Wednesday, June 19, 2013

Using netcat as a server

Just this morning I was checking out some piece of software and was trying to setup its mail configuration. But it would not function the way I thought it was supposed to so I had a look into my mail server logfile. With the tailf -command I would be seeing the messages to and from the mail server. But as I was looking at little to no action the logfile suddenly was filling my screen with messages.

Someone was trying to use my mailserver....

Tuesday, November 27, 2012

Vmware Server 2 - "Failed to initialize monitor device."

After rebooting the server my virtual machines would not start up again. Neither automatically nor manually. This problem had me confused for a while but I finally found a simple solution.

The problem was that kvm-intel module was loaded, so simply removing this, and restarting the vmware service was sufficient to restart my virtual machines.

sudo rmmod kvm-intel
sudo service vmware restart

After this my virtual machines had no problem starting.

Wednesday, November 7, 2012

Backup your images on JottaCloud

On JottaCloud you can easily backup your images or files. I use JottaCloud to save a backup of the images I take on my Android phone.

Sunday, September 23, 2012

SSH without password prompting

Usually while working on different computers I am using SSH. Being prompted for a password is not a favourite of mine, so I set up my computers to connect without needing a password. It's easier than you think.

Thursday, August 9, 2012

Encrypted storage


In case you have documents and files you don't want anyone to be able to see there is always the possibility to use truecrypt. Truecrypt will let you use a file or partition as an encrypted storage. It is easy to use and not at all hard to understand. It also supports Linux, Windows and Mac so you can use it on whatever platform you wish.

Truecrypt is no longer safe.
Check their website before using it.

You can even encrypt part of an USB-pendrive and include the files for running the truecrypt program on the USB-drive. This way you will be able to use you USB-device on other computers without needing to install the package on the computer you are working on. (But you will need admin privileges.)

To download TrueCrypt head over to their web-site. Go to the download page and download the package for your platform. After downloading the Linux gzipped tarball you simply extract it and run the truecrypt installation-file.

Step 1:
Run truecrypt to open the GUI for the program and create a new encrypted volume. Using a file is as it can be. Click on Create Volume, select the folder to put the file in, and give it a filename. Follow the instructions to set the encryption, password and any other option.

Step 2:
In the TrueCrypt main window select the slot you want to put your encrypted volume in, click on Select File and navigate to the file you created in the previous step. Click on Mount and type your password for the encrypted filesystem when prompted.

Step 3:
Add files or folders to your encrypted filesystem as you do to any filesystem.

That's all there is to it.
Easy and well functioning way of keeping some documents private.
To use a portable USB-drive check the documentation on TrueCrypt web-site.

Thursday, June 28, 2012

Jupgrade [migrating undefined]


Joomla!

The last week or so I've been working on updating and migrating a Joomla! site. Going from Joomla! 1.5.26 to 2.5 seemed to be smart upgrade. Unfortunately I ran into some problems when trying to use Jupgrade to migrate the database. I also got some problems with some outdated components but I got most of the stuff working.
The biggest problem I encountered was the "migrating undefined" problem. Luckily I found an easy, but perhaps ugly, solution to this problem.

Wednesday, June 20, 2012

Changing the info for a pdf-file

Usually when creating a pdf-file I do it from Libreoffice. But sometimes I need to scan some pages and create a pdf-file from that. On those occasions the title showing up in the pdf-viewers title bar is either blank or is being filled by the scanner software.
I like my pdfs to look more professional so I change the Title value and usually also the Author value.

Monday, June 18, 2012

Merging pdf-files

Merging and splitting pdf-files is very easy if you have pdftk installed. Using it is as simple as you could ever want it. But I usually end up having to check the man-page if I want to do more complex stuff. I use it everytime I need to do something with a pdf-file. Although there are GUI options my preferred program for working with pdf-files are pdftk.