jeudi 1 janvier 2015

What is the command for finding some counters in linux?


I am developing a Java swing application to find the Linux performance counter values. Till now i got command for



System - vmstat
Memory - cat/proc/meminfo
Disk - iostat -dxm /dev/sda


Now i want to collect Processes, network, TCP Counters. I thought sar command can used to collect these counters. But i dont know proper way to use that. Anyone know the command means kindly help me...



Why did Ubuntu 14.04 installation removed my Windows?


I was required to reinstall Ubuntu 14.04 on a dual-boot Lenovo laptop. During the install I choose the option 'remove Ubuntu 14.04.1 and install Ubuntu 14.04' which in the end removed my Windows installation. There is only one (1) partition on the hard drive. Windows is GONE!


Does the Ubuntu installer no longer check if something else is installed? How to recover my Windows now?



How to fix sudden Ubuntu 14.04 graphics problem?


I have a dual boot Lenovo laptop (Windows 8 / Ubuntu 14.04) which worked just fine. Until today. When I log in to Ubuntu I type my password as usual and select for example 'Ubuntu' as the environment. After that, I only see the background image and a mouse pointer I can move, but nothing else. No menu, no bar, nothing! Also when I choose GNOME Flashback (Compiz) or GNOME Flashback (Metacity) the same happens. When I choose KDE I am able to see some bars and menus, but unable to click anything!!


How can I at least start in a terminal mode to save all data and reinstall Ubuntu from scratch)?


To start again I always need to power off the laptop by force (i.e. pressing the power button).


Addendum:



  • I tried to start in recovery mode with failsafe graphics mode. Here also nothing starts, even after waiting for minutes.

  • I have not changed any hardware.


  • Yesterday I tried to connect the laptop to an external monitor via HDMI without success. I did not change any xorg configuration.




  • Attempts to fix this problem made it only worse. I backup all data and re-install Ubuntu 14.04 from scratch.





Crouton with kali linux and external wifi adapter


Is it possible to make kali or linux installed with crouton to see the external wifi adapter so I can use it in monitor mode/etc?



kill cat command


Many times I accidental run cat command on files have contents upto few thousand line.


I try to kill the cat command by Ctrl+ C or Ctrl+Z but both works after completion of cat command, all I have to do is wait till cat gets completely execute.


Is there better solution rather than waiting?? cause sometimes the files are upto size of 100MBs and It gets irritating to wait for it.



Where is the memcached configuration file in archlinux?


I can't find a configuration file for memcached (1.4.21-1) on archlinux. I have looked in /etc/ and /etc/conf.d/ . Is there a config file? And where can I find it?



stdout redirect. sh: resource temporarily unavailable


I have large batches of bash processes. Each bash script invokes executeables which have their stdout redirected to distinct log files. About 5% of the runs end up with: sh: [name of log]: Resource temporarily unavailable I tried to reduce amount of jobs running in parallel, but still the error persisted on some of the bash scripts.


Additional info:



  • Ubuntu 14.04 LTS running on VM using ESXi

  • Happens on a new partition, allocated with gparted and LVM (new logical volume consisting of the entire partition)

  • The LV is exported using nfs-kernel-server

  • The LV is also shared to windows using Samba

  • The LV is formatted using ext4

  • I have admin rights on this machine


More detailed info



  • Everything is run in a cluster, using Sun-Grid-Engine

  • There are 4 virtual machines: m1, m2, m3, m4

  • m1 runs sge master, sge exec, and ldap server

  • m2, m3, m4 run sge exec

  • m3 runs nfs-kernel-server, exporting a home folder sitting in logical volume (using LVM) that uses a partition on a local disk, to m1, m2, m4

  • m3 has a soft link to the home folder

  • m1, m2, m4 mount the home folder through fstab, so all machines end up pointing to the same home folder

  • m3, m2, m4 run ldap clients, connecting to m1

  • All jobs are submitted to the cluster through m1 (configured as a submission host)

  • Jobs fail exclusively on m3 (which exports the disk). Most of the jobs on m3 are passing though. Failures are random, but consistently on m3 alone.

  • m3 also shares the home via samba to windows clients Any help would be greatly appreciated :) (how to debug, which logs are relevant, how to get more info out of the system, etc...)


Thank you in advance!