"C" programmatically clear L2 cache on Linux machines
What would be the programmatic steps written in "C" associated with clearing the L2 cache on a Linux OS machine? /sys/devices/system/cpu/cpu0/cache/index2/size = 6144K x 8CPUs ...
What would be the programmatic steps written in "C" associated with clearing the L2 cache on a Linux OS machine? /sys/devices/system/cpu/cpu0/cache/index2/size = 6144K x 8CPUs ...
I've started programming Erlang code that's going into production (gulp!), but I'm still using TextMate in Mac OS X, Notepad++ in Windows 7, and GEdit in Ubuntu 10.04... (I use all three at work and at home). Emacs is the IDE of choice for programming Erlang, and I'd like to use the same editor on all three platforms. I have an idea of...
I would like to build a program which takes a username as parameter and creates the user and its home folder (with some hard-coded specifications like folder, and security checks like username cannot be root or an existing user). My application needs to create users in order to give SSH access. The program will be executed using sudo. ...
I'm having trouble checking out a project via svn. I have a repository set up at svn://consideropen.com/home/consider/rvsubversion/project/trunk. I have no problem checking out the project in NetBeans, but, when I ssh to another server (not the same server as the repository) and run svn checkout svn://example.com/home/consider/rvsubve...
Is there any linux command that will print the directory structure in the form of a tree, e.g., folder1 a.txt b.txt folder2 folder3 ...
Hi Experts, I need to login to a website with username and password, and then download a file. The url of the file is static. How do I automate the above process with Linux/Unix scripts? Thanks a lot. Jiangzhe ...
How to make sqlplus in Linux to maintain history of my queries? So that I could use up/down arrows to get my previous query. ...
I faced few issues while writing server application using TCP on linux system. I have few queries. Where are socket FDs are stored and what are the attributes associated with socket FDs. How the kernel differentiates between FDs like socket FDs, file Fds, Message Queue FDs Socket FDs are received as int sockFD = socket(..., ..., .....
I'm programming C++ on Ubuntu, using QDBus and I've got the following code snippet: this->m_cRemoteInterface = new QDBusInterface("org.my.service", "/data", "org.freedesktop.DBus.Properties.Get"); QDBusReply<uint64_t> cResult = m_cRemoteInterface->call("property1"); The code throws the following error: org.freedesktop.DBus.Erro...
When I try to use boost on an old Linux system, I get the message: Compiler not configured - please reconfigure The version of my gcc is: gcc version 2.9-gnupro-99r1 And in boost's gcc.hpp file I see: // versions check: // we don't know gcc prior to version 2.90: #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) # error "Compile...
Hi, i am using a named pipe for IPC on a Debian system. I will be sending some data as a set of strings from a bash script to a background running process written in C code. The data i want to send is four strings eg accountid, firstname,surname, description. Currently i am sending the data as a char array separated by spaces from my ba...
Im writing a shell script to use the scp command (ssh) to transfer a file across to a computer. This obviously is password protected is there a way on either end to either...disable the password or to auto complete the password for the customer? This out of pure convience and I have no idea if it is possible (im fairly new to linux), a...
I am writing a C program in Linux which will read/write to/from a serial port. I know the data that needs to be read and written on the port but I don't have a serial port to currently test this with. Is there any way to simulate a serial port? Would reading/writing to a file be sufficient? I can have one process write to the file whil...
I'm running a client/server application on Red Hat Enterprise using ZMQ for message passing. The IPC socket used to associate a client with the server is implemented using a Unix domain socket. If user A starts the server process, it seems like only clients started by user A can connect to and communicate over that socket. Our project r...
I am doing a research on how someone can detect whether another machine is running Windows or Linux, if it runs inside a virutal machine, if it's behind NAT\proxy\VPN and what not. I saw some interesting tools like p0f, which does passive detection. Basically, I know there are implementation differences in TCP and other underlying protoc...
Good applications should expect short reads/write almost everywhere. But actually, for example, when reading small number of bytes from filesystem or from pipe short reads just [almost] never occur and defects in it's handling can remain undetected. How to test group of applications interconnected by pipes and sockets and reading and w...
In a shell script how would I find a file by a particular name and then navigate to that directory to do further operations on it? From here I am going to copy the file across to another directory (but I can do that already just adding it in for context.) Thanks in advance :) ...
I am using awk '{ printf "%s", $3 }' to extract some field from a space delimited line. Of course I get partial results when the field is quoted with free spaces inside. May any body suggest a solution please? ...
Hi, I am new to device driver development. I am trying to access the GPIO of MPC837xERDB eval board. I have upgraded its kernel to linux-2.6.28.9 and enable support for mpc8xxx_gpio.c. On boot up, it successfully detect two gpio controllers. Now my question is how I am going to use it to communicate with the gpio pins? Do I have to modi...
Hello, I'm using php 5.2.9 on a production server, and it seems that the exec() function behaves "non-standard". If i run exec("ls", $output, $return_var) then $output will contain the list of files in the current folder as expected, but $return_var will be set to -1 instead of 0, as expected. I'm using the $return_var to determine wher...