Install Cacti on Ubuntu 10.04 LTS

1. Install command: apt-get install snmpd
2. edit the file /etc/default/snmpd
3. find line SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 and remove string 127.0.0.1
save the changes

4 edit the file /etc/snmp/snmpd.conf
Find the line com2sec readonly  default  public
and replace the community string name (i.e., public) with the one for your snmp community
for example: com2sec readonly  default  unpatti
Save the changes

5. restart snmp daemon /etc/init.d/snmpd restart
6. test using the command: /usr/bin/snmpwalk -v 2c unpatti 127.0.0.1

Note: replace unpatti with the ro community string of your server
Note: In this tutorial, the MySQL and Apache2 have been installed in the system and running.
Check whether SNMP is installed and run, if SNMP it is not installed, run apt-get install snmp apt-get php5-snmp

Part B. Install Cacti

1. Install command: apt-get install cacti
2. press/choose ok to acknowledge message of Configuring libphp-adodb
3. configure database for cacti with dbconfig-common(y)? yes
4. supply Password of the database’s administrative user: your mysql root password
5. define MySQL application password for Cacti: yourpassword
6. Choose type of webserver to be used: Apache2 (OK)
… system will proceed with … selecting previously deselected package Gawk …
Finished.

7.Go to http://yourhost/cacti using browser to continue installation process
8. Cacti Installation Guide info, click Next
9. Choose: New Install and then Next
10. Cacti will show the following information
Database User: cacti
Database Hostname:
Database: cacti
Server Operating System type: Unix

11. Click Next
Make sure that RDTool 1.3x or higher is selected

12. Click Finish.
13. First time login on http://yourhost/cacti
user: admin
password: admin

15. proceed with password change
16. Add your device
Go to Management -> Devices -> Add

Install Project Fedena version 2.2 on Win32

Step 1: Install Ruby
Download and install One-Click Ruby Installer for Windows.
http://rubyforge.org/frs/download.php/72085/rubyinstaller-1.8.7-p302.exe

Step 2: Install Rails
Now we can use the RubyGems package manager to download and install Rails 2.3.5(Note: Version should be 2.3.5),
Open a command window and run the command gem install rails -v=2.3.5 –remote

Step 3: Install MySQL
1. Download and install the “essential” version of the MySQL installer v5.0
http://downloads.mysql.com/archives/mysql-5.0/mysql-essential-5.0.90-win32.msi
2. Copy libmysql.dll from MySQL bin directory (usually C:\Program Files\MySQL\MySQL Server 5.0\bin) to Ruby bin directory (usually C:\Ruby\bin)

Step 4: Setup Fedena
4.1. Download Fedena source code from GitHub. Extract the ZIP/TAR archive and save to a folder (say C:\Fedena22).
4.2. Now goto the fedena source directory in command line/prompt.
4.3. Run the command gem install mysql
4.4. Run command gem install declarative_authorization -v 0.5.1
4.5. Run command gem install searchlogic -v 2.4.27
4.6. Run command gem install i18n -v 0.4.2
4.7. Run command gem list (check for i18n version, if there is version 0.6.0, uninstall it, using command gem uninstall i18n )
4.8. Update the MySQL database details in config/database.yml (under “development:”)
4.9. Run the command rake db:create This will create the required databases.
4.10. Run command gem install win32-open3 to install win32-open gem.
4.11. Run the command rake db:migrate This will populate the database with required tables.
4.12. Finally, run the command ruby script/server This would start the server and it will be accessible at http://localhost:3000
4.13. If you want to run Fedena in production mode, run the command ruby script/server -e production For this, Production database details should be given in config/database.yml

Step 5: Install RMagick for Fedena
(This installation is needed to solve error when uploading student profile picture)

http://files.rubyforge.vm.bytemark.co.uk/rmagick/RMagick-2.12.0-ImageMagick-6.5.6-8-Q8.zip

5.1. Unzip ImageMagick-6.5.6-8-Q8.zip
5.2. Go to the unzip result folder and run ImageMagick-6.5.6-8-Q8-windows-dll.exe to install it.
5.3. Unzip RMagick-2.12.0.tar.gz
5.4. Copy the result, Rmagick-2.12.0 folder to C:\
5.5. Copy rmagick-2.12.0-x86-mswin32.gem to C:\RMagick-2.12.0
5.6. Navigate into folder C:\RMagick-2.12.0 using Windows Command Prompt
5.7. Run the command gem install rmagick --local

Step 6: Install wkhtmltopdf

This is to solve PDF creation problem ( error message: Create PDF Error: Bad wkhtmltopdf’s path )

6.1. Download the installer from http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-installer.exe

6.2. Install to folder c:\wkhtmltopdf

6.3. Edit c:\Fedena22\config\initializers\wicked_pdf.rb as follows:

#:wkhtmltopdf => '/home/foradian/sooraj/wkhtmltopdf-i386',
:wkhtmltopdf => 'c:\wkhtmltopdf\wkhtmltopdf.exe',

References:
http://latunyj.no-ip.org/2011/07/fedena-project-for-win32-platform/
http://projectfedena.org/install

Domain Name Server

DNS atau Domain Name Server berguna untuk memberitahukan alamat IP dari nama situs / server yang diperlukan oleh browser. Misalnya kalau browser perlu ke alamat http://www.gdln-indonesia.org maka browser akan menerima informasi alamat IP dari server http://www.gdln-indonesia.org agar dapat browse ke server tsb. Catatan penamaan http://www.curtin.edu.au , http://www.yahoo.com , dll, sebenarnya dibuat untuk memudahkan manusia untuk mengingat alamat web. Sedangkan komputer / server bekerja untuk mengatur arus-lalu lintas trafik dengan menggunakan IP Address (IP = Internet Protocol). Dengan demikian pemetaan nama ke IP diperlukan oleh komputer untuk bisa saling berkomunikasi.

Untuk keperluan ini dibuatlah DNS yang berfungsi untuk menyimpan data nama dan IP yang dimiliki oleh berbagai server / komputer yang ada pada suatu jaringan, baik LAN, WAN maupun Internet.
Dalam kasus tidak bisa browse ke situs http://www.curtin.edu.au atau situs lainnya perlu dicek terlebih dahulu apakah DNS server bisa melakukan resolve nama ke IP address. Untuk itu coba dari dos prompt atau console, terminal linux, ketikan perintah:

nslookup http://www.curtin.edu.au

Jika server DNS yang digunakan bekerja maka akan diperoleh hasil sebagai berikut:

Server: cdns01.vividwireless.com.au
Address: 180.216.255.56

Non-authoritive answer:
Name: http://www.curtin.edu.au
Address: 134.7.179.56

Dari hasil diatas yang menjawab adalah server DNS milik ISP via mana komputer saya terhubung ke internet,  nama Domain Name Servernya adalah cdns01.vividwireless.com.au dengan IP 180.216.255.56 yang bekerja melalui port 53 (http melalui port 80). Hasil query : http://www.curtin.edu.au dengan address 134.7.179.56. Kata non-authoritive answer berarti bahwa catatan / record IP address tidak ditangani oleh DNS milik ISP vividwireless.com.au tetapi DNS vividwireless.com.au menerima info tersebut dari server lain yang menangani record tersebut (dalam hal ini server DNS untuk domain .edu).

Kemudian coba lakukan ping ke IP address yang diberikan oleh DNS. Coba ping 134.7.179.56, jika diperoleh reply berarti server tersebut on dan terdapat routing ke server. Kemudian coba ping dengan nama server, ping http://www.curtin.edu.au, harusnya juga diterima reply.

Bisa juga terjadi kasus bahwa server DNS down dan proses resolve nama ke IP address tidak bisa dilakukan,  dalam kondisi ini tidak bisa digunakan nama http://www.curtin.edu.au dengan perintah ping atau pada browser dengan http://www.curtin.edu.au. Hal ini disebabkan server DNS tidak dapat memberikan resolve informasi nama ke IP address yang diperlukan oleh komputer client. Untuk kondisi ini jika diketahui alamat IP dari server yang dituju maka bisa dilakukan proses browsing hanya dengan menggunakan alamat IP, mis. 134.7.179.56 untuk gdln. Untuk aplikasi-aplikasi tertentu seperti download file dan email yang akan diakses mungkin masih bisa berfungsi dengan baik, namun untuk aplikasi-aplikasi yang memerlukan penggunaan nama lengkap server http://www.curtiin.edu.au akan diperoleh pesan error.

Server DNS di INHERENT UNPATTI adalah server dengan IP address 167.205.164.5 yang diberi nama pattimura.inherent-dikti.net atau dalam domain unpatti.edu, server ini memiliki nama pattimura.unpatti.edu dengan alias kamboti.unpatti.edu. DNS record yang dimiliki oleh kamboti hanya untuk domain internal unpatti.edu dan unpatti.net. Untuk nama domain yang lain misalnya .ac.id, .org, .com dll, kamboti akan melakukan proses forward (menanyakan) resolve nama ke IP ke server DNS induk di ITB dengan IP 167.205.23.1. Hasil resolve akan diberikan oleh server di ITB ke pada kamboti kemudian kamboti akan memberikannya kepada computer client yang memerlukan.

Jika koneksi ke server DNS di ITB terputus dengan INHERENT maka kamboti akan gagal untuk mendapatkan informasi resolve nama ke IP address, dengan demikian tidak dapat dilakukan proses akses / browsing ke server karena browser / computer client tidak memperoleh informasi IP address. Namun dengan menggunakan IP address langsung yang diketahui masih bisa dilakukan proses browsing ke server gdln atau server lainnya, walaupun dengan beberapa kemungkinan bahwa ada error pada aplikasi-aplikasi tertentu.

Untuk server-server di INHERENT UNPATTI, record DNS-nya bersifat global artinya bisa di resolve dari INTERNET dengan perintah nslookup seperti hasil yang ditunjukkan dibawah ini:

nslookup pattimura.inherent-dikti.net

Server: dnsp1.curtin.edu.au
Address: 134.7.134.7

Non-authoritive answer:
Name: pattimura.inherent-dikti.net
Address: 167.205.164.5

Hal ini menunjukkan bahwa dalam jaringan Internet nama-nama domain tersebut telah disimpan pada salah satu DNS server yang ada (server DNS ITB di 167.205.23.1), sehingga server DNS di Curtin University bisa memperoleh info tersebut. Hanya saja dari jaringan Internet server-server yang berada dalam jaringan WAN INHERENT tidak bisa diakses, karena diberikan pembatasan routing dan firewall di ITB. Jika pembatasan routing dan firewall ditiadakan maka server-server tsb akan on-line di jaringan Internet dan dapat diakses dari mana saja. Ini memberikan gambaran bahwa sebenarnya UNPATTI secara tidak langsung melalui INHERENT telah memiliki server-server yang siap untuk digunakan untuk kebutuhan jaringan sekelas Internet.

The Application of PC Soundcard as A Data Acquisition Device Controlled by MATLAB Data Acquisition Toolbox

The report provides explanation on the design and application of a PC soundcard used as a data acquisition device controlled by Matlab Data Acquisition Toolbox. The idea was based on the needs to apply an economic and reliable data acquisition device to digitize the analogue audible sound wave which can be stored for further analysis. The report covers explanations on the area of Matlab programming in assigning the soundcard as a data acquisition hardware, processing the acquired data in Matlab workspace, plotting the acquired data and technique to store the data acquisition results into hard drive for advanced application and analysis outside Matlab programming environment.

Keywords: Data Acquisition, Matlab, PC Soundcard

Background

In this report a discussion regarding the application of a build-in regular PC soundcard as data acquisition device is explained. The main idea to apply the soundcard as a data acquisition device was based on the fact that getting a special data acquisition board or device used to digitize analogue information of sound wave is expensive. Therefore, the option to use the regular PC soundcard is a reasonable option to capture the magnitude of analogue sound wave by using a microphone connected to soundcard and then convert the captured information into digital form (digitalization). Another reason to use the soundcard was that it becomes an integrated component in every PC used nowadays. Hence, there will be no problem in finding a soundcard attached to a PC that will be used to digitize audible sound wave. Data Acquisition Toolbox from Matlab was used as the software to control the application of a PC soundcard in the digitalization process of audible sound wave received via a microphone. In this design, Matlab was the software used to control and regulate the digitalization process using a soundcard which is applied as the hardware.

The Data Acquisition Toolbox consists of three distinct components: M-file functions, the data acquisition engine, and hardware driver adaptors. These components and relationships are shown in Figure 1. Continue reading

The Design and Application of An External Switching Board for Sending Binary ON-OFF Output via PC Serial Port

The design and application of an external switching board which receives binary on-off signal or command via the PC RS-232 port (serial port) of a PC was explained to accommodate the needs to control the activation and de-activation process of industrial actuators based on the controller input-output parameters. The binary on-off signal used to drive the operation of the external switching board was a sequence of electric voltage which in the form of +5V DC for the process of switching off and on the device. The +5 V DC electric pulses were sent to the input of the device through a connection at pin no. 3 (Tx) of the 9-pins RS-232 port connection. There were two models of circuit designed, the first one used Silicon Controlled Rectifier (SCR) as the self-locked or latch component, while the second model used electromagnetic switch (relay) as the self-locked or latch components. The electric pulsed which were send through RS-232 port connection were generated by a simulated automatic controller build by using Matlab Software.

Keywords: serial port, switching board, Matlab

I. Background to the Design

There was a need to send on-off (binary) command signal or output from PC which can be used to switch on or switch off a system or industrial actuators such as electric motors, heating elements, electro-pneumatics valves, etc. In the application, the on-off command signal will be generated by software applications in the form of an automatic controller system which built by using software such as Matlab, C++, and Pascal. The serial port (RS-232 port) of a PC can be used to send the signal to an external switching board which functions as the hardware that controls the operation of an industrial actuator. In the operation, the external switching board connected to the RS-232 port received on-off signal from the automatic controller system build or simulated in a PC. Further, the signal which is in the form of electric voltage of +5Volt DC for switch on command and 0 Volt for switch off command will then used to trigger the external switching board. The cycle of electric voltage send to the input of external switching board can be seen as a sequence of electric pulses which has 0 Volt for minimum value and +5 Volt DC for maximum value. In this case, the sequence of electric pulses send from RS-232 port of the PC will determine statuses of the external switching board (i.e., on or off switching statuses). The external switching board will be equipped with relays that added to increase the rating current and voltage which can be handled by the device. The usage of relays add functionality of the designed switching board to handle the switching process of high power electric apparatus such AC motors and high power heating elements.

There are two design and application sides of the external switching board which will be discussed in brief in this report. The first part which will be discussed or explained is the software side. The software side discussion explains basic software application using Matlab to provide binary on-off decisions used to send sequences of electric pulses to activate and de-activate the external switching board which connected the serial port.

 

Schematic Diagram of the System

Schematic Diagram of the System

Figure 1. Schematic Diagram of the System

The arrangement of the system for the application of the external switching board is shown in Figure 1. The PC send the pulse to the external switching board through RS-232 port which then interpreted by the switching board to switch on or switch off the electric load to AC 220 V power supply line. Continue reading