linux

How to retrieve the current processor time in Linux?

Hi, I am using C language and Linux as my programming platform in embedded device. My question is, how to correctly retrieve the current processor time(tick). I am using clock() function in time.h and it seems I am getting inconsistent value. Thanks. ...

What does "soft/hard nofile" mean on Linux

When I tried to install a software on RedHat EL5, I got the error that the expected value of soft/hard nofile is 4096 while the default is 1024. I managed to increase the number, but I don't know what the parameters are. Are they refering to soft link and hard link? The way I change it is: A) modify the /etc/security/limits.conf user s...

Getting 401 unauthorized error while accessing webDav folder from my C# application?

Hi, I have set up WebDAv server on my Debian linux and this is working fine as I am able to connect it by using FireFox and IE. But while I am trying to connect it by the following code, it returns: "The remote server returned and error:(401) Unauthorized error" try { // Build the SQL query. strQuery...

Emacs ... as your default shell?

Is it possible instead of loading /bin/bash, for my terminal to load emacs or emacsclient when I open it up, with a session for eshell? And is it feasible to ssh->screen from an emacs session without running into problems? I want to do this purely to learn about emacs being as I like it so much. No hate text, etc please :) ...

In Python script, how do I set PYTHONPATH?

I know how to set it in my /etc/profile and in my environment variables. But what if I want to set it during a script? Is it import os, sys? How do I do it? ...

Problems with simple bash commands in the shell

Hello, I need to add java to my PATH on one of my Linux servers, to do this I edited the bashrc and added, PATH=/usr/local/jdk1.6.0/bin export PATH Since then I have not been able to use simple bash commands like ls nano locate cp is there any way I can fix this? The OS of the server is CentOS 5 with Plesk 9 (64-bit), can anyone help...

Cross-compiling SpiderMonkey

Hey all, I don't know if anyone of you've experienced this before, but I'm having trouble cross-compiling Mozilla's JavaScript engine, SpiderMonkey, on Linux. What I'm trying to accomplish is to compile 32-bit shared libraries on CentOS 5.4 x86_64. I'm using js-1.7.0. Here's the make command I used: CFLAGS="-m32 -DCROSS_COMPILE=1" CXXF...

Show input keystrokes in Vim

When I installed Vim on Windows, it (specifically gVim) used to show to show me the keystrokes I am currently entering in the bottom right corner of the screen. But now I'm working with gVim on Linux, and it doesn't show me. Is there a setting (:set) I need to turn on to do this ? ...

Choosing newer gcc version for upgrade

I develop C++ applications on CentOS 5.4 and we came across several inconvenient situations with gcc 4.1.2 like inability to debug local variables in class constructor which is a confirmed gcc bug (same problem with scoped variables). I'm considering to upgrade to higher gcc version. What version should I choose for production environmen...

Generate a waveform image from an audio file

Building a python application that converts raw audio files into wave using sox on a linux system. I want it to be able to generate an image (PNG or Jpeg) of the audio waveform pattern but I am unable to find a command line tool or python package that will do this. Not being an experience Python programmer my options are limited. There ...

Have maven run jetty on port 80 jetty in Linux

I don't know what's wrong with Jetty. My apache2 (run as a service) works fine on my Ubuntu, but Jetty always raise Permission Denied. I have come through some search result but ---I'm confused--- Would any one please provide an easy follow through that can allow me to invoke mvn jetty:run where jetty was set up to run on port 80? ...

Setting up Unix for development dual boot with Vista and Windows Server 2008

Hi, I'm a PC guy and a Microsoft Platform Developer. I've got a new assignment from my client whiche has to be develop with open source technologies. Hhas already send me server information where I've to deploy. The hosting information he has given is CentOS environment with Ruby (with Rails) and Python support. I've chosen Ruby becaus...

How to see changelogs for a particular module in kernel

Hello, I want to know how to see the changelogs or commit messages for a module in the kernel. Actually i modified virtio_net in kernel2.6.26. Now the virtio_net in 2.6.34 seems to be lot different from the one in 2.6.26. There should be some git commit messages or changelogs for the different versions of virtio_net. I want to know the...

Linking problems with shared objects on linux (using a simple so in a console application)

I have a shared object (abc.so) that i built after linking it to a bunch of libs (.a and .so) files. Now this abc.so just exposes 3 functions. Now i am writing a console application on linux that uses this abc.so to invoke those function. When i try to build that application, I get a bunch of - "Undefined reference to 'xxxxxxx' " erro...

Linking problem using OpenMp with ctypes.

Hi there, I have a c99 function that uses openmp, which works as expected. I also wrote a ptyhon interface using ctypes which causes the problem. Ctypes/python can not find the library for openmp. Here is the error massage: File "foo.py", line 2, in <module> foobar=cdll.LoadLibrary("./libfoo.so") File "/usr/lib/python2.6/ctypes/_...

How do I get the MAC/Serial of a DVB device on Linux?

I have a couple of Hauppage 950Q USB tuners attached to a Linux PC (CentOS) and I want to be able to differntiate which one is which. On windows I can query the MAC of the USB tuners to accomplish this, but on Linux I am not sure how to do that because this functionality is not exposed (to my knowlege) by the video4linux API that I'm ac...

How to detect smartcard insertion or removal event in linux

Folks, I'm working on a certificate authentication app that will authenticate user based on CAC inserted. How do I know when the CAC is inserted / removed? I'll be "catching" that event in C++ or Java. Thanks. ...

Stable and simple ampq server for ubuntu

I am using rabbitmq-server as a ampq server with python client on Ubuntu 10.04 64 bit OS. Rabbitmq-server now fails to start. I uninstalled and installed the latest rabbitmq-server 1.8.0 but still I could not make rabbitmq to work. I want to other alternative with less learning curve to use the ampq on ubuntu system. Can you recommend...

Generating a CSV list from Linux 'ps'

Suppose I have a ps command that looks like this: ps -Ao args:80,time,user --sort time It will give me a "space" separated set of rows. A row might look like this paulnath -bash 00:00:00 I would like to convince ps to delimit by commas(or tabs even!), such that it can be processed automagically by other languages. Please note that...

How to delete selected text in VI editor

I am using putty and vi editor if select 5 lines using mouse and i want to delete those lines how can i do that Also how can i select the lines from keyboard like in windows i pres shift and move the arrows to select the text. how can i do that in vi ...