C,C++/JAVA/BASH/ASM ARENA

वह प्रदीप जो दीख रहा है झिलमिल दूर नही है थक कर बैठ गये क्या भाई मन्जिल दूर नही है चिन्गारी बन गयी लहू की बून्द गिरी जो पग से चमक रहे पीछे मुड देखो चरण-चिनह जगमग से बाकी होश तभी तक, जब तक जलता तूर नही है थक कर बैठ गये क्या भाई मन्जिल दूर नही है अपनी हड्डी की मशाल से हृदय चीरते तम का, सारी रात चले तुम दुख झेलते कुलिश का। एक खेय है शेष, किसी विध पार उसे कर जाओ; वह देखो, उस पार चमकता है मन्दिर प्रियतम का। आकर इतना पास फिरे, वह सच्चा शूर नहीं है; थककर बैठ गये क्या भाई! मंज़िल दूर नहीं है। दिशा दीप्त हो उठी प्राप्त कर पुण्य-प्रकाश तुम्हारा, लिखा जा चुका अनल-अक्षरों में इतिहास तुम्हारा। जिस मिट्टी ने लहू पिया, वह फूल खिलाएगी ही, अम्बर पर घन बन छाएगा ही उच्छ्वास तुम्हारा। और अधिक ले जाँच, देवता इतन क्रूर नहीं है। थककर बैठ गये क्या भाई! मंज़िल दूर नहीं है।

Installing Tomcat7 on Fedora15/Linux through Command Line September 8, 2012

Filed under: Uncategorized — whoami @ 10:45
Tags: , , ,

Hello Friends,

Generally it happens we installing any  software , configure it and then make it running after much hard work. But we forget it when the next time, when we need to go through the installation on crashed machine or new computer. And there is no point in remembering each and every step of installation. We just need to know the overview to install it again. But yeah we need to get the document for step wise installation , otherwise we are again going to waste time by experimenting with new installation.

 

I am posting this because i was once having fedora , then tomcat was installed and configured well either using “Yum” or “command line installation” . At that time, i was beginner in installing Tomcat, so it took me time to keep things running. Now i know how things work in tomcat. This time i need to install tomcat fresh on the fedora, but i do not remember the steps, so i went through some articles and installed it. Also i converted the contents to pdf for further reference

will update the post on any new stuffs related to Tomcat installation and its uses.

 

kill any process Forcibly in Unix March 18, 2010

Filed under: fedora,LINUX,Top Coder,TOPCODER — whoami @ 19:18
Tags: , , ,

Often it happens that some programs hangs and it doesnot close by clicking the “X ” button.In that case we can use “$kill ” command to kill the process.”$Kill” has several options attached with it. To kill something forcibly we use “-9” option. I show u some example.
——————
step1:->
$ps -a
-> this will list all process (but not that which runs in the background)
$ps -e
->this will list all process , evem those that runs in the background

—————————————
step2->
Now that we have listed the process by above two methods, chose the “pid” of that process which u want to kill
$kill “pidnumber”
->where pidnumber is the one u noted from above which u want to stop.
**this may not kill some process. So for this use -9 option
$kill -9 “pidnumber”
-> now ur required process will be closed
———————————–
Actually sometimes while using TopCoder Arena, the applet didnot closes or it Hangs, To stop it either i has to restart the system or i had to log off and then log in. Now through theses commnads with -9 option i can close it.
sample:->

[abc@localhost ~]$ ps 
  PID TTY          TIME CMD
 3564 pts/0    00:00:00 bash
 3857 pts/0    00:00:00 ps
[abc@localhost ~]$ ps -a
  PID TTY          TIME CMD
 3858 pts/0    00:00:00 ps
[abc@localhost ~]$ ps -e
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 migration/1
    7 ?        00:00:00 ksoftirqd/1
    8 ?        00:00:00 watchdog/1
    9 ?        00:00:01 events/0
   10 ?        00:00:00 events/1
   11 ?        00:00:00 cpuset
   12 ?        00:00:00 khelper
   13 ?        00:00:00 netns
   14 ?        00:00:00 async/mgr
   15 ?        00:00:00 kintegrityd/0
   16 ?        00:00:00 kintegrityd/1
   17 ?        00:00:00 kblockd/0
   18 ?        00:00:00 kblockd/1
   19 ?        00:00:00 kacpid
   20 ?        00:00:00 kacpi_notify
   21 ?        00:00:00 ata/0
   22 ?        00:00:00 ata/1
   23 ?        00:00:00 ata_aux
   24 ?        00:00:00 ksuspend_usbd
   25 ?        00:00:00 khubd
   26 ?        00:00:00 kseriod
   27 ?        00:00:00 khungtaskd
   28 ?        00:00:00 pdflush
   29 ?        00:00:00 pdflush
   30 ?        00:00:00 kswapd0
   31 ?        00:00:00 aio/0
   32 ?        00:00:00 aio/1
   33 ?        00:00:00 crypto/0
   34 ?        00:00:00 crypto/1
   40 ?        00:00:00 scsi_eh_0
   41 ?        00:00:00 scsi_eh_1
   43 ?        00:00:00 kpsmoused
   44 ?        00:00:00 kstriped
   45 ?        00:00:00 ksnapd
   46 ?        00:00:00 usbhid_resumer
   69 ?        00:00:00 kdmflush
   70 ?        00:00:00 kdmflush
   71 ?        00:00:00 kjournald2
   80 ?        00:00:00 kauditd
  158 ?        00:00:00 udevd
  776 ?        00:00:00 kmmcd
  795 ?        00:00:00 tifm
  863 ?        00:01:23 phy0
  894 ?        00:00:00 pccardd
  989 ?        00:00:00 hd-audio0
 1063 ?        00:00:00 kmpathd/0
 1064 ?        00:00:00 kmpathd/1
 1065 ?        00:00:00 kmpath_handlerd
1093 ?        00:00:00 kjournald
 1179 ?        00:00:00 kondemand/0
 1180 ?        00:00:00 kondemand/1
 1212 ?        00:00:00 auditd
 1214 ?        00:00:00 audispd
 1215 ?        00:00:00 sedispatch
 1239 ?        00:00:00 rsyslogd
 1262 ?        00:00:00 rpcbind
 1281 ?        00:00:03 dbus-daemon
 1291 ?        00:00:00 avahi-daemon
 1292 ?        00:00:00 avahi-daemon
 1301 ?        00:00:00 cupsd
 1322 ?        00:00:00 acpid
 1330 ?        00:00:01 hald
 1333 ?        00:00:00 console-kit-dae
 1334 ?        00:00:00 hald-runner
 1424 ?        00:00:04 hald-addon-inpu
 1442 ?        00:00:00 hald-addon-gene
 1458 ?        00:00:00 hald-addon-cpuf
 1459 ?        00:00:00 hald-addon-acpi
 1475 ?        00:00:00 pcscd
 1489 ?        00:00:00 NetworkManager
 1495 ?        00:00:00 nm-system-setti
 1499 ?        00:00:00 wpa_supplicant
 1507 ?        00:00:00 rpc.statd
 1533 ?        00:00:00 rpciod/0
 1536 ?        00:00:00 rpciod/1
 1543 ?        00:00:00 rpc.idmapd
 1551 ?        00:00:00 bluetoothd
 1565 ?        00:00:00 bluetooth
 1578 ?        00:00:00 sshd
 1618 ?        00:00:00 gpm
 1629 ?        00:00:00 crond
 1640 ?        00:00:00 atd
 1648 ?        00:00:00 gdm-binary
 1649 tty4     00:00:00 mingetty
 1650 tty5     00:00:00 mingetty
 1651 tty2     00:00:00 mingetty
 1652 tty3     00:00:00 mingetty
 1653 tty6     00:00:00 mingetty
 1694 ?        00:00:00 gdm-simple-slav
 1695 tty1     00:05:29 Xorg
 1724 ?        00:00:00 dbus-launch
 1772 ?        00:00:00 sendmail
 1773 ?        00:00:00 sendmail
 1840 ?        00:00:01 devkit-power-da
 1842 ?        00:00:00 devkit-daemon
 1895 ?        00:00:00 gdm-session-wor
 1920 ?        00:00:00 gnome-keyring-d
 1934 ?        00:00:00 gnome-session
 1949 ?        00:00:00 dbus-launch
 1951 ?        00:00:00 dbus-daemon
 2032 ?        00:00:02 gconfd-2
 2037 ?        00:00:00 gnome-settings-
 2050 ?        00:00:04 metacity
 2055 ?        00:00:24 pulseaudio
 2056 ?        00:00:02 gnome-panel
 2059 ?        00:00:00 gconf-helper
 2061 ?        00:00:00 gvfsd
 2073 ?        00:00:00 gvfs-fuse-daemo
 2077 ?        00:00:02 nautilus
 2079 ?        00:00:00 bonobo-activati
 2084 ?        00:00:00 seapplet
 2085 ?        00:00:00 nm-applet
 2086 ?        00:00:00 bluetooth-apple
 2090 ?        00:00:00 python
 2091 ?        00:00:00 notification-da
 2093 ?        00:00:00 gnome-volume-co
 2096 ?        00:00:00 im-settings-dae
 2098 ?        00:00:00 kerneloops-appl
 2105 ?        00:00:01 gpk-update-icon
 2116 ?        00:00:01 gnome-power-man
 2129 ?        00:00:02 kerneloops
 2314 ?        00:00:00 gconf-im-settin
 2348 ?        00:00:00 gvfsd-trash
 2351 ?        00:00:00 gvfs-gdu-volume
 2353 ?        00:00:01 devkit-disks-da
 2354 ?        00:00:00 devkit-disks-da
 2364 ?        00:00:00 trashapplet
 2365 ?        00:00:03 wnck-applet
 2368 ?        00:00:00 gvfs-gphoto2-vo
 2373 ?        00:00:01 clock-applet
 2377 ?        00:00:01 tomboy
 2378 ?        00:00:00 notification-ar
 2380 ?        00:00:00 gdm-user-switch
 2388 ?        00:00:00 gvfsd-burn
 2398 ?        00:00:00 run-mozilla.sh
 2413 ?        00:04:51 firefox
 2432 ?        00:00:01 gnome-screensav
 2753 ?        00:00:02 gedit
 3562 ?        00:00:00 gnome-terminal
 3563 ?        00:00:00 gnome-pty-helpe
 3564 pts/0    00:00:00 bash
 3718 ?        00:00:01 javaws ->this is TopCoder application running
 3763 ?        00:00:18 javaws->--do--
 3860 pts/0    00:00:00 ps
[abc@localhost ~]$ kill -9 3718
[abc@localhost ~]$ kill -9 3763
[abc@localhost ~]$ kill -9 2413
[abc@localhost ~]$ ps -e


 

CLearing Search History from Ktorrent February 8, 2010

Filed under: fedora,LINUX — whoami @ 16:54
Tags: ,

This facility is not available in ktorrent that comes bundled with fedora.

so how to delete search history from ktorrent ?
=> U can proceed this way
command
[1](root mode)#gedit /home/username/.kde/share/apps/ktorrent/search_history

[2]Now here delete the history from here

Thanks….

 

How to unlock yum in fedora February 7, 2010

Filed under: fedora,LINUX — whoami @ 18:46
Tags: , ,

are u trying to install something on feodra and command “yum install something” displays
that “yum is currently busy with other application”.
—>Then u need to kill or remove that peocess from this file
1.check for pid that yum in busy with.
2. check file #gedit /var/run/yum.pid
(i) U can delete that pid number from file. This will Unlock yum
Now u can use yum

 

Compile Linux kernel fedora 11 January 26, 2010

Filed under: fedora,LINUX — whoami @ 09:10
Tags: , ,

steps:-

[1] download kernel from kernel.org
now u have linux-2.6.X.tar.gz or linux-2.6.X.tar.bz2 in home folder
[3]$tar tar zxvf linux-2.6.x.tar.gz
[4]$cd linux-2.6.x
[5]$make defconfig
it will take less than 5 minutes
note**- if u use defconfig, it will take very less around 30 minutes to complete the whole process.

but i issued $make oldconfig, and the whole compilation and making modules took around 2.30 hrs.

u can use and experiment with:
$make xconfig
[6]$make bzImage
this will take around 20 minutes
[7]$make modules
if u used defconfig, then it may take 1 or 2 minutes.
But i used oldconfig, and it tool 1.20 hrs to make modules
COMPILATION AND MODULES COMPILING IS COMPLETE NOW

[8]$make modules_install
This step may deny permission
so make entry in root mode mode
$su –
password
$cd /home/username
$cd linux-2.6.x
$make modules_install

same thing happened as i discussed in step 7
[9]$ mkinitrd /boot/initrd-2.6.x.img 2.6.x
[10] $ cp arch/i386/boot/bzImage /boot/bzImage-KERNEL_VERSION
$ cp System.map /boot/System.map-KERNEL_VERSION
$ ln -s /boot/System.map-KERNEL_VERSION /boot/System.map
follow this link
[11]$cp cp .config /boot/config-2.6.x
[12]cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.29
[13]now edit grub.conf
$gedit /boot/grub/menu.lst
edit it as written in link
my grub.conf is below after editing, though its not booting
———————————–
my grub.conf
——————————-
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,8)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=20
splashimage=(hd0,8)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.30.9-96.fc11.i686.PAE)
root (hd0,8)
kernel /vmlinuz-2.6.30.9-96.fc11.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rhgb quiet
initrd /initrd-2.6.30.9-96.fc11.i686.PAE.img
title Fedora (2.6.30.9-90.fc11.i686.PAE)
root (hd0,8)
kernel /vmlinuz-2.6.30.9-90.fc11.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rhgb quiet
initrd /initrd-2.6.30.9-90.fc11.i686.PAE.img
title Fedora (2.6.30.8-64.fc11.i686.PAE)
root (hd0,8)
kernel /vmlinuz-2.6.30.8-64.fc11.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rhgb quiet
initrd /initrd-2.6.30.8-64.fc11.i686.PAE.img
title Test Kernel (2.6.29)
root (hd0,8)
kernel /vmlinuz-2.6.29 ro root=/dev/mapper/VolGroup-lv_root rhgb quiet
initrd /boot/initrd-2.6.29.img

title Xp
rootnoverify (hd0,0)
chainloader +1
===================================
Though this kernel is not booting, i will try to fix it soon

Thanks
njoooy linuxxxxxxxxx

 

Linux logging problems &Solutions January 20, 2010

Filed under: fedora,LINUX — whoami @ 20:13
Tags: , ,

[1]Get access of root by:
adding a line to kernel line- write “single” then press “enter” to save and then press “b” to boot.
follow
U will directly enter into command line as root . Now u can change the root password by:
$passwd

[2]Now suppose u forgot the passwords of users Or in some version of linux U cannot graphically boot as root. Then u can do following things:-

**Add new users and their password** for this :
root#adduser -m username -ppass
root#passwd username
follow this link

***to graphically boot for root*** do as:-
#vi /etc/pam.d/gdm
and comment “#” one line
follow this link

 

Removing Installed Packages(Fedora) January 12, 2010

Filed under: fedora,LINUX — whoami @ 10:22
Tags: ,

Search for the all installed packages first:-
$ rpm -qa
this will display the installed packages

Today i remove oracle 10g to free the space by issuiing:
$yum erase oracle-xe-univ-10.2.0.1-1.0.i386

i got around 1.5 gb freed.