What I got inside my VPS

#  cat /proc/cpuinfo | grep processor
processor    : 0
processor    : 1
processor    : 2
processor    : 3

I got 4 processor.

# free -m
total       used       free     shared    buffers     cached
Mem:          2048        347       1700          0          0         99
-/+ buffers/cache:        247       1800
Swap:         2048          0       2048

I got memory 2GB and also 2GB for swap.

# cat /proc/user_beancounters
Version: 2.5
uid  resource                     held              maxheld              barrier                limit              failcnt
112:  kmemsize                 28933925             30662656            975175680           1073741824                    0
lockedpages                     0                 1008               262144               262144                    0
privvmpages                197953               295114  9223372036854775807  9223372036854775807                    0
shmpages                    16658                57806  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
numproc                        59                  132  9223372036854775807  9223372036854775807                    0
physpages                   88832               241468                    0               524288                    0
vmguarpages                     0                    0                    0  9223372036854775807                    0
oomguarpages                56353                57070                    0  9223372036854775807                    0
numtcpsock                      7                   14  9223372036854775807  9223372036854775807                    0
numflock                       24                   32  9223372036854775807  9223372036854775807                    0
numpty                          1                   10  9223372036854775807  9223372036854775807                    0
numsiginfo                      0                   30  9223372036854775807  9223372036854775807                    0
tcpsndbuf                  150880               683328  9223372036854775807  9223372036854775807                    0
tcprcvbuf                  114688              4167240  9223372036854775807  9223372036854775807                    0
othersockbuf               168776               395968  9223372036854775807  9223372036854775807                    0
dgramrcvbuf                     0                 4624  9223372036854775807  9223372036854775807                    0
numothersock                  134                  171  9223372036854775807  9223372036854775807                    0
dcachesize               19465689             22209127            487587840            536870912                    0
numfile                       543                 1105  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
dummy                           0                    0  9223372036854775807  9223372036854775807                    0
numiptent                      20                   20  9223372036854775807  9223372036854775807                    0

It means I got OpenVZ

# df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs       11G  1.5G  9.3G  14% /
none            1.1G  4.1k  1.1G   1% /dev
none            215M  1.1M  214M   1% /run
none            5.3M     0  5.3M   0% /run/lock
none            859M     0  859M   0% /run/shm
none            105M     0  105M   0% /run/user

Means I have 11GB space.

# dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 15.2927 s, 70.2 MB/s

versus SSD vps hosting

# dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 6.14146 s, 175 MB/s

Bigger result with short time mean better HD.

# swapon -s
Filename                Type        Size    Used    Priority
/dev/null                               partition    2097152    0    -1

Mean swap enable on my vps.

 

 

 

 

Using Gparted for VPS Disk Partition

Install slackware in a vps is assignment I create for student. The challenge is rather different than install others (BSD or Linux distro) operating system. Yes, create partition is a must in this work. If Ubuntu or CentOS or OpenSUSE provide easy way to create partition then Slackware is strict.

The minimal solution is still the same. Create swap and native but you must use command line tools like cfdisk or fdisk. One of my student admire if he did different way to accomplish the job. He use Gparted to create the partition followed by Slackware installation.

I think his way might be useful for others who want to achieve the same target : install slackware in vps.  So, here the steps I try to recreate for that aim.

Preparing Gparted & Slackware ISO

I use vps provider that let me use custom iso like Vultr. After login then click ‘My ISO’ to upload the iso.

I use Gparted from Jaist mirror.

I also use Slackware 14.1 iso from Slackware mirror.

Both of iso use 64 bit version.

Enter location of iso file then upload.

install slackware 14 vps1 Using Gparted for VPS Disk Partition

More

Find out uptime of VPS

My friend send email asking for command line. His boss don’t believe on uptime report  he made. He told me that he got the report from 3rd party that manage the server.  He want to know it and will show the result to his boss.

As far as I know the command for checking are :

1. uptime

# uptime
04:17:02 up 82 days, 23:34,  1 user,  load average: 0.00, 0.00, 0.00

2. w

# w

04:17:05 up 82 days, 23:34,  1 user,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    36.68.204.105    04:16    0.00s  0.03s  0.02s w

As usual for more detail or option available using man.

# man uptime

UPTIME(1)                     Linux User’s Manual                    UPTIME(1)

NAME
uptime – Tell how long the system has been running.

SYNOPSIS
uptime
uptime [-V]

DESCRIPTION
uptime  gives  a one line display of the following information.  The current time, how long the system has been running, how many users are cur-
rently logged on, and the system load averages for the past 1, 5, and 15 minutes.

This is the same information contained in the header line displayed by w(1).

FILES
/var/run/utmp  information about who is currently logged on
/proc     process information

AUTHORS
uptime was written by Larry Greenfield <greenfie@gauss.rutgers.edu> and Michael K. Johnson <johnsonm@sunsite.unc.edu>.

Please send bug reports to <albert@users.sf.net>

SEE ALSO
ps(1), top(1), utmp(5), w(1)

Cohesive Systems                  26 Jan 1993                        UPTIME(1)

If you want to print it you might want to export it first.

# man uptime > uptime.txt

If you have vps or dedicated server then you can compare it versus confirmation email from provider.