Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 LINUX/UNIX


  Use DTrace to diagnose gdb issues

A few days ago, I installed the newest 64-bit gdb program (version 7.7.1) on Solaris 10 (X86_64 platform) to debug programs. After playing with the gdb a day, I found 2 issues about gdb:(1) The "set follow-fork-mode child" command doesn't take effect. By default, after the parent process forks the child process, the gdb will track the parent process, so this command can make gdb begin to follow the child process. But this command works OK on Linux.(2) The gdb can't parse the 32-bit application core dump file. Per my understanding, the 64-bit gdb should parse both 32-bit and 64-bit core dump fi...

5,045 1       UNIX DEBUG DTRACE GDB


  Beginners guide to Linux directory structure

Have you ever looked in your / directory, you’ll see a lot of directories. Here we are presenting beginners guide to linux directory structure explaining what they mean and what are the contents of these directories.Screenshot of contents of root directory: /This is called root partition. All files and directories start with root partition. Write privileges under this directory are avaible with root user only. Not to confuse it with root user’s home directory, know the difference, “/” is root partition while root user’s home directory is “/rootâ€...

5,014 0       LINUX FILE SYSTEM STRUCTURE


  How to check why Vim is slow

On *nix, some processes may not be able to start up, software runs very slowly suddenly and software's "Segment Fault" are some issues faced by many *nix users. Here we show you how to use truss to trace why Vim becomes slow suddenly.Operating system : FreeBSD-5.2.1-releasvim version is 6.2.154, after typing vim on command line, sometimes we need to wait for a few minutes to get into the edit interface and there is no error output. After carefully checking .vimrc and all vim settings, there are no error configuration. Also there are no similar solutions online. Do we need to hack the source co...

4,980 0       VIM TRUSS LINUX


  About tmpfs

tmpfs is another confusing name in Linux kernel, its implementation is in mm/shmem.c, shmem has no relation to tmpfs at first glance although we know tmpfs is based on memory. We can understand why we use this name by seeing where this is used.In a desktop Linux system, tmpfs is loaded usually:% grep tmpfs /proc/mountsdevtmpfs /dev devtmpfs rw,seclabel,nosuid,relatime,size=1958956k,nr_inodes=489739,mode=755 0 0tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev,relatime 0 0tmpfs /run tmpfs rw,seclabel,nosuid,nodev,relatime,mode=755 0 0tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,relati...

4,946 0       LINUX TMPFS FILE SYSTEM


  My frequently used Linux commands

In our day to day work. We may have many chances working on Linux/Unix systems. There are many things we may need to do, checking logs, navigating in directories, creating file or installing software. We may use many commands to complete the work, such as ls, mkdir, cd etc.Below are my frequently used Linux commands or programs recently:pwd : print working directory, sometimes I need to check which working directory I am in in order to know where to go next.ls : List current directory files, before I can operate on a directory, I need to know what are in the directory so that I may not delete ...

4,909 0       PROGRAM LINUX COMMAND


  Why I Still Use Emacs

At school, I’m known as the Emacs guy; when people have questionsabout configuring Emacs or making it work a certain way, they oftencome and ask me. Sometimes, some people ask me why use Emacs at all?Isn’t it a really old editor and aren’t Eclipse or Visual Studio muchbetter? I mean, they don’t have weird key bindings and haveintellisense, that’s surely better for a programmer, right?I will attempt in this post to explain some of the reasons why I stillcling to Emacs. Believe me, I don’t think I have any emotionalattachment to Emacs; the reason I canno...

4,903 1       LINUX ADVANTAGE IDE EDITOR EMACS


  How to find which process a file is being written by in Linux?

Some people ask a file is being written by one process and they want to check this process, but they cannot find the process even with sof.This question is very common and there are many solutions, here we introduce a straightforward method. In Linux, each file will be stored on one device and of course there will be a relative inode, then we can use vfs.write to know who is writing the inode on one specified device continuously. Luckily there is inodewatch.stp in the installation package of systemtap, it locates at /usr/local/share/doc/systemtap/examples/io. It is used foe above.Let take a lo...

4,597 0       LINUX PROCESS FILE WRITE


  Build Hadoop environment in Linux

Hadoop standalone installation:1. Install JDKInstall JDK with below command:sudo apt-get install sun-java6-jdkConfigure Java environment, open /etc/profile, add below contents:export JAVA_HOME = (Java installation directory)export CLASSPATH =".:$JAVA_HOME/lib:$CLASSPATH"export PATH = "$JAVA_HOME/:PATH"Verify installation of JavaType java --version, if it outputs Java version information, then Java is successfully installed.2. Install SSHInstall SSH with below command:sudo apt-get install sshConfigure SSH to login to local PC without password:ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsaP...

4,570 1       CONFIGURATION HADOOP.LINUX