Record Shell Session in Linux

Posted by cikul | Posted in Linux | Posted on 03-12-2013-05-2008

0

Sometimes we need to log all activity we do in linux terminal. That is no problem if your terminal client had the feature, but if your terminal client don’t have feature to log your session, you can use “script” command record everything you do in a terminal session.

it’s very simple to use script, you only type this command from your shell


script -a filename

Now everything you type, as well as everything that returns as output, will be saved into the filename you chose to output to.

To stop script session, type “exit”, and script daemon will stop to recording your session


[root@server ]# exit
exit
Script done

Share and Enjoy

Add multiple IP Address CentOS

Posted by cikul | Posted in Linux | Posted on 02-12-2013-05-2008

0

In Linux, we can add more than 1 IP Address in single ethernet device. To adding more IP address we must add new IP in network device configuration file,


nano /etc/sysconfig/network-scripts/
 

Read the rest of this entry »

Share and Enjoy

Install MariaDB on CentOS

Posted by cikul | Posted in Linux | Posted on 28-11-2013-05-2008

0

MariaDB repositories doesn’t included by default on CentOS.
If you want to install MariaDB using YUM, you need to add MariaDB repository

nano /etc/yum.repos.d/MariaDB.repo

Read the rest of this entry »

Share and Enjoy

[Linux] Find/search text in file under directory

Posted by cikul | Posted in Linux | Posted on 12-03-2013-05-2008

0

To search text in file under directory/subdirectory, for example we want to find php file under /home directory contains text “eval” in the content, we can use command :


shell [~]# find /home/ -name "*".php -type f -print0| xargs -0 egrep "eval" | uniq -c | sort -u | cut -d":" -f1 | awk '{print "Warning - please check this files " $2}' | uniq > eval.log

Share and Enjoy

[CentOS-RedHat] Linux /boot: Out of Disk Space While Installing Package kernel

Posted by cikul | Posted in Linux | Posted on 21-01-2013-05-2008

2

When updating Kernel using YUM, i got this error message :

Transaction Check Error:
  installing package kernel-2.6.32-379.14.1.lve1.1.9.9.el6.x86_64 needs 10MB on the /boot filesystem
Error Summary
-------------
Disk Requirements:
  At least 10MB more space needed on the /boot filesystem.

It means /boot partition is out of disk space. You need to verify this with the df command

Read the rest of this entry »

Share and Enjoy

[JQuery] Open POST result in new window

Posted by cikul | Posted in Internet, Programming, web | Posted on 16-10-2012-05-2008

1


$.post('/url/to/get/data',data,function(result) {
WinId = window.open('', 'newwin', 'width=400,height=500');
WinId.document.open();
WinId.document.write(result);
WinId.document.close();
});

Share and Enjoy

[Oracle] Automatically Kill inactive Sessions

Posted by cikul | Posted in Oracle, Programming, SQL, Technology | Posted on 28-09-2012-05-2008

0

The problem you could face with arbitrary killing of inactive sessions is that you may kill a session that was still running (it could have just completed one procedure & hadn’t yet started another).

Perhaps an easier way to accomplish what you want (although I’m guessing here at what it is you want to do!) is to set the users’ profiles to automatically kill their session after a specified period of time e.g.

Read the rest of this entry »

Share and Enjoy

[Oracle] instance recovery required, cannot set ARCHIVELOG mode

Posted by cikul | Posted in Oracle, SQL, Technology | Posted on 26-09-2012-05-2008

0

When I try to set archivelog in another machine using this guidance. I’ve got this error message :


SQL> startup mount;
ORACLE instance started.

Total System Global Area  320309648 bytes
Fixed Size                   731536 bytes
Variable Size             285212672 bytes
Database Buffers           33554432 bytes
Redo Buffers                 811008 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Read the rest of this entry »

Share and Enjoy

[Solaris] Check CPU Speed & Memory Size

Posted by cikul | Posted in Linux, Technology | Posted on 26-09-2012-05-2008

1

SUN OS based on UNIX, but has different structure with another linux system. For example in Linux, you can easily check CPU & Memory info using /proc/cpuinfo and /proc/meminfo, or you can check hardware information using lspci or dmidecode.

And how in SunOS?

Read the rest of this entry »

Share and Enjoy

[Oracle] Setting ArchiveLog mode

Posted by cikul | Posted in Oracle, SQL | Posted on 25-09-2012-05-2008

3

What Is Archive Log?

As a DBA, you are responsible to recover any failures to a point of failure and also to perform your backup while online. Your organization is a 24×7 shop and you are not able to shutdown the database. Therefore, the database has to be in an archive mode.

For example you have severe corruption or a database crash that required you to restore some datafiles from several hours ago. If you have all the archived logs from that pint in time up until the moment of the crash, you can roll forward all the changes contained in those archived logs against the restored datafiles.

This process will replays all the changes in the database over the past hours. After recovering the last archived log, Oracle will then look to roll forward even more by using the online redo logs. If those online redo logs contain changes necessary, Oracle will apply those changes also.

Read the rest of this entry »

Share and Enjoy