/sbin/iptables -A PREROUTING -t nat -p tcp -d $NATIP --dport 5900 -m
state --state NEW,ESTABLISHED,RELATED -j DNAT --to 192.168.0.2:5900
Linux administration , Unix administration , Vmware Vsphere administration , Oracle DBA ,apache, backup, dhcp, dns, kvm, xen, kernel, ldap, kvm, monitoring, ticketing, networking, Mail servers, SAN,troubleshooting
Labels
- Amanda (2)
- Ansible (2)
- Answer these Questions (2)
- antivirus (2)
- apache (3)
- Bash (16)
- Chef (3)
- Citrix (2)
- clusters (2)
- Concept (22)
- DatabaseAdminstration (11)
- DevOps (1)
- dhcp (2)
- Downloads (3)
- ELK (1)
- ELK stack (1)
- encryption (1)
- Free trainings (1)
- Frequently Used Commands (46)
- FTP (1)
- git (1)
- gpg (2)
- Hardware (1)
- httpd (2)
- Interview Questions (53)
- iptables (1)
- IT NEWS (3)
- java (1)
- kibana (2)
- knife (1)
- KVM (2)
- linux (17)
- Linux installations (22)
- Linux Jobs (4)
- Linux Links (2)
- logstash (1)
- Mac (1)
- MediaWiki (1)
- MySql (2)
- Nagios (2)
- Networking (3)
- open Nebula (5)
- Open Source tools (12)
- OpenNMS (1)
- openSSL (1)
- Oracle on Linux (5)
- Performance Monitoring (1)
- php (1)
- postfix (1)
- postgres (1)
- postgres-XL (1)
- Product Reviews (1)
- Python (2)
- rssh (1)
- Samba (2)
- Scripting (16)
- security (4)
- selinux (1)
- Server (1)
- SFTP (1)
- Social Awareness (1)
- Solaris (1)
- SSL (1)
- svn (1)
- TCP/IP (1)
- Technology (1)
- Tips and Tricks (32)
- Training and materials (8)
- Troubleshooting (6)
- Ubuntu (18)
- unix (1)
- virtualization (17)
- Vmware (25)
- Vyatta (1)
- windows7 (1)
- xml (1)
Iptables Port forwarding for VNC
Monitor your Boot Sequence with Bootchart
Ubuntu – Monitor your Boot Sequence with Bootchart
About Bootchart
Bootchart is a tool used to analyse your system performance in linux boot process.
It process all the required information accumulated during the boot process
(CPU usage and disk usage) which will then display as PNG, SVG, EPS encoded chart.
First of all you will have to Install Bootchart on Ubuntu.
Installation
sudo aptitude install bootchart
Reboot your PC
When you restart your computer Bootchart will create a graphical illustration in .png format.
Disabling and Enabling Bootchart
To disable Bootchart just use these code:
cd /etc/init.d
sudo update-rc.d -f stop-bootchart remove
Removing any system startup links for /etc/init.d/stop-bootchart
/etc/rc2.d/S99stop-bootchart
/etc/rc3.d/S99stop-bootchart
/etc/rc4.d/S99stop-bootchart
/etc/rc5.d/S99stop-bootchart
And to re-enable just use these codes:
cd /etc/init.d
sudo update-rc.d stop-bootchart start 99 2 3 4 5 .
Adding system startup for /etc/init.d/stop-bootchart ...
/etc/rc2.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc3.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc4.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc5.d/S99stop-bootchart -> ../init.d/stop-bootchart
About Bootchart
Bootchart is a tool used to analyse your system performance in linux boot process.
It process all the required information accumulated during the boot process
(CPU usage and disk usage) which will then display as PNG, SVG, EPS encoded chart.
First of all you will have to Install Bootchart on Ubuntu.
Installation
sudo aptitude install bootchart
Reboot your PC
When you restart your computer Bootchart will create a graphical illustration in .png format.
Disabling and Enabling Bootchart
To disable Bootchart just use these code:
cd /etc/init.d
sudo update-rc.d -f stop-bootchart remove
Removing any system startup links for /etc/init.d/stop-bootchart
/etc/rc2.d/S99stop-bootchart
/etc/rc3.d/S99stop-bootchart
/etc/rc4.d/S99stop-bootchart
/etc/rc5.d/S99stop-bootchart
And to re-enable just use these codes:
cd /etc/init.d
sudo update-rc.d stop-bootchart start 99 2 3 4 5 .
Adding system startup for /etc/init.d/stop-bootchart ...
/etc/rc2.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc3.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc4.d/S99stop-bootchart -> ../init.d/stop-bootchart
/etc/rc5.d/S99stop-bootchart -> ../init.d/stop-bootchart
Common Scripting errors for beginners
when i started scripting i had these errors in the begenning . The most common mistakes one makes during his initial stages of scripting are.
1.Check script file permissions. A script needs execute permission
2.We should not use default values that generate errors.If you
give those your script execution breaks in the middle.
3.We must supply parameters as required ie make parameter mandatory
if parameter is to be provided for sure, or else it throws an error.
4. Resuable script should not be hard-coded values.Use parameters instead.
5.Commenting the script is very important... Make it a habbit to write
comments.Also specify in comments if script has multiple parameters.
you can also write examples in comments for better understanding.
6. Error handling is a must for scripting
1.Check script file permissions. A script needs execute permission
2.We should not use default values that generate errors.If you
give those your script execution breaks in the middle.
3.We must supply parameters as required ie make parameter mandatory
if parameter is to be provided for sure, or else it throws an error.
4. Resuable script should not be hard-coded values.Use parameters instead.
5.Commenting the script is very important... Make it a habbit to write
comments.Also specify in comments if script has multiple parameters.
you can also write examples in comments for better understanding.
6. Error handling is a must for scripting
what is Citrix presentation server ?
Citrix presentation server uses ICA protocol
allow to remotely access individual application.
It appears on the task-bar so we can toggle around the screens.
Adds management infrastructure ( allow more sessions on to server)
ability to start applications from a web site
allow to remotely access individual application.
It appears on the task-bar so we can toggle around the screens.
Adds management infrastructure ( allow more sessions on to server)
ability to start applications from a web site
Install and configure SVN ( Subversion ) on Ubuntu Linux
Install Subversion
sudo apt-get install subversion
Install apache module
sudo apt-get install libapache2-svn
Create Repository
--------------------
Repository is a central place where the data is stored and maintained in an organized way.
Command to create the repository.
sudo svnadmin create /svn
Edit the configuration file for the subversion webdav.
vi /etc/apache2/mods-enabled/dav_svn.conf
uncomment this element : this is the end tag of location
uncomment DAV svn
Location element in this file denotes the root directory where the subversion will be accessible from,
for example
http://YOUR-IP-ADDRESS/svn
uncomment SVNPath /svn
SVNPath should be set to the same place where you created your repository using svnadmin command
Basic Authentication.
Uncomment the following three lines to enable the basic authentication.AuthUserFile sets the password file
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Creating users for the repository:
Command to create user:
sudo htpasswd -cm etc/apache2/dav_svn.passwd
-c -- Create user for the first time.
-m -- Create another user for same repository.
If -c is given after having some users, all those users will be deleted . Use -m to create new user for same repository.
Restart apache2 server to see the web console of svn
sudo /etc/init.d/apache2 restart.
sudo apt-get install subversion
Install apache module
sudo apt-get install libapache2-svn
Create Repository
--------------------
Repository is a central place where the data is stored and maintained in an organized way.
Command to create the repository.
sudo svnadmin create /svn
Edit the configuration file for the subversion webdav.
vi /etc/apache2/mods-enabled/dav_svn.conf
uncomment this element : this is the end tag of location
uncomment DAV svn
Location element in this file denotes the root directory where the subversion will be accessible from,
for example
http://YOUR-IP-ADDRESS/svn
uncomment SVNPath /svn
SVNPath should be set to the same place where you created your repository using svnadmin command
Basic Authentication.
Uncomment the following three lines to enable the basic authentication.AuthUserFile sets the password file
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Creating users for the repository:
Command to create user:
sudo htpasswd -cm etc/apache2/dav_svn.passwd
-c -- Create user for the first time.
-m -- Create another user for same repository.
If -c is given after having some users, all those users will be deleted . Use -m to create new user for same repository.
Restart apache2 server to see the web console of svn
sudo /etc/init.d/apache2 restart.
Fix for Postfix “Relay access denied”
vi /etc/postfix/main.cf
mynetworks = 192.168.1.0/24
smtpd_use_tls = no
mynetworks = 192.168.1.0/24
smtpd_use_tls = no
Troubleshooting network Bandwidth Usage - Mahesh Patil ( Hexagrid.com )
a) dstat -f <==== Showed me that there is more network traffic on eth1 when compared to eth0 and that too.. it is outgoing traffic.
b) iftop -i eth1 <==== Confirms what dstat says and also mentions which IP is pulling Data from some 'X' location
c) nethogs eth1 <==== Shows which process is the culprit. apache2 is the process using up the bandwidth in sending job.
Once it was established that it was Apache process.. I stopped and restarted it. Looks like what ever process was downloading data got canceled and the network usage has come down to normal.
Tested with the above commands again after apache restart to confirm same.
vnstat <== good command to tell the usage.
b) iftop -i eth1 <==== Confirms what dstat says and also mentions which IP is pulling Data from some 'X' location
c) nethogs eth1 <==== Shows which process is the culprit. apache2 is the process using up the bandwidth in sending job.
Once it was established that it was Apache process.. I stopped and restarted it. Looks like what ever process was downloading data got canceled and the network usage has come down to normal.
Tested with the above commands again after apache restart to confirm same.
vnstat <== good command to tell the usage.
Subscribe to:
Posts (Atom)


