Pages

Thursday, 14 June 2012

OpenVZ commands

You can switch on and off the CTID field with the 'e' key on your keyboard.

Real-time monitoring in the command line interface can be performed with
# vzstat [-p CTID] [-b|-v]
-p can be used if statistics on one or several containers are required.

-b switches to the brief mode
-v switches to the verbose mode (default)

Set a limit on the number of processes and
# vzctl set 101 --numproc 100:100 --save

check the validity of the container configuration.
# vzcfgvalidate /etc/sysconfig/vz-scripts/101.conf

Adjusting Container Disk Quota Parameters

1 In the host system type
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 1048576 109752 938824 11% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 200000 23577 176423 12% /
2 Now, increase disk space and the number of inodes for the container.
# vzctl set 101 --diskspace 2097152:2097152 –-save
Saved parameters for Container 101
# vzctl set 101 --diskinodes 220000:250000 --sav

 3 Check the disk space and the inodes again.
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on vzfs 2097152 109752 1987400 6% /
# vzctl exec 101 df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
vzfs 220000 23577 196423 11% /
After you increased disk space, more inodes immediately became available.

User-Group Disk Quota

Per-user/group statistics can be obtained by entering
# vzquota stat -t

Using User-Group Disk Quota

Let us enable the user-group disk quota for a container.
Create a container.
# vzctl create 131
Set its quotaugidlimit to 150 and start this container.
# vzctl set 131 --quotaugidlimit 150 --save
# vzctl start 131
We can use UID/GID quotas inside container 131 now.
# vzctl exec 131 repquota -a
# vzquota stat 131 -t
After a container exceeds its UID/GID limits, any new attempt to create a user or a group (or, more precisely, to create on-disk files or directories owned by this user/group) will fail. Already existing users will not be affected in this case.

 for CT in $(vzlist -H -o ctid); do echo "== CT $CT =="; vzctl exec $CT uptime; done

for x in `ls /var/vz/veip/`; do echo VID=$x; sudo /usr/sbin/vzctl exec $x "w | grep load";done

Wednesday, 13 June 2012

DDOS finding

Use the command

tcpdump -n -i eth0/1/any |  then you will get the packets that connects to the device..

then go the server

 vzlist -a| grep"ip"

If you want further reference please check the link 

http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html

then block the ipholder..

done!

Tuesday, 12 June 2012

Moodle Installation

You better to follow the below link to install moodle.

ysbnet.in/manuals/moodle/

WHMCS E-mail piping error

Some times the admion will face the pipe.php error. The below link will help you to sort out the issue.

http://docs.whmcs.com/Email_Piping

http://docs.whmcs.com/Support_Departments

http://www.youtube.com/watch?v=8XIao3rsrXE

Thanks !

Monday, 11 June 2012

RDP not found in windows local mechine.

sometime it happens you can't find the RDP then just do this to get the connection wizard

Start -> Run -> mstsc.exe

You will get the window of RDP connection.

Done !

Sunday, 10 June 2012

OpenVZ container get locked.

some times there is an error occur in the opnVZ that container get locked.

So to active the container you need to do some simple steps.

The message will look like this,

[root@server ~]# vzctl stop 104
Container already locked 
 
Delete the lock file 
 
[root@server ~]# rm /vz/lock/104.lck
rm: remove regular file `/vz/lock/104.lck'? y 
 
Kill the checkpoint
 
[root@server ~]# vzctl chkpnt 104 --kill
Killing... 
 
Then check the status. The container will be up.
 
Done ! 

Saturday, 2 June 2012

Windows server + Firewall Editing.

If the windows server refuse to connect through the RDP or RDP disconnects frequently just check with the firewall. There may be some ports to be defied. To do this,

1.Start > Administrative Tools > Windows Firewall with Advanced Security.

2. In the window top left you can see an option >> inbound rules

3. Here you can edit the port setup.