I'm messing around with Linux kernel 2.4 and function schedule() in sched.c uses the macro prepare_arch_schedule, which appears to be an infinite loop. What is that? And how does it finish?
Hi,
I am using C language and Linux as my programming platform.
I am learning how to create a daemon, and I want to create a log file so that I write a debug message in my daemon. My question is where should I put the log file in my system. Should I put it in the var folder?
Please advice.
Many thanks.
Is it possible to clear a file preserving its timestamp, using standard Linux commands? For example:
echo "" file-name
converts the text file to empty, this is OK for me. But I need to keep the timestamp unchanged.
I'm curious how far others have pushed Boost.Asio in terms of scalability. I am writing an application that may use close to 1000 socket objects, a handful of acceptor objects, and many thousand timer objects. I've configured it such that there's a thread pool invoking io_service::run and use strands in the appropriate places to ensure my handlers do not stomp on each other.
My platform is Red Hat Enterprise Linux with Boost 1.39, though I'm not opposed to upgrading to a more recent version of boost.
I have a series of python scripts with execute permissions in Linux. They are stored in SVN.
If I then run svn up to update them, the overwritten files are back to 644 - ie no execute permissions for anyone.
Yes I could just script it to chmod +x * afterwards, but surely there's a way to store permissions in SVN or to maintain them when you update?
Any suggestions appreciated.
Hi
I have a C++ program running under linux. Is it possible to track its memory usage from the code? I am allocating new objects and running out of memory, so I want to keep track of how quickly I am using memory.
Thanks
I need to study about load-balancers, such as Network Load Balancing, Linux Virtual Server, HAProxy,...There're somethings under-the-hood I need to know:
What algorithms/technologies are used in these load-balancers? Which is the most popular? most effective?
I expect that these algorithms/technologies will not be too complicated. Are there some resources written about them?
Thank you very much for your help.
I have a legacy C++ project on Linux which uses the typical:
./configure
make
make install
to build and install. I would really like to build it instead with an IDE like Eclipse.
Is this doable? Is there something in Eclipse that can parse the original Makefile(s) and turn it into an Eclipse project?
I have a piece of usb hardware, for which I know the driver.
However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ?
When I create a .tex file using vim I get a nice template from having
autocmd BufNewFile *.tex 0r $HOME/.vim/templates/skeleton.tex
in my .vimrc. I also have a makefile-template in my home directory, but this one I have to manually copy to where the .tex file is. In a Linux environment, how can I auto-copy or auto-generate the makefile at the same time as I create a .tex file?
Is it possible? Run a cvs diff in terminal at the project root that outputs only modified files (like local files that aren't in source control and local modified files).
I'm running cvs diff --brief but I still have too many results since my project is large, and with a lot of subdirectories - it shows the whole hierarchy and I just want to know which files are different from HEAD revision. I'm using Linux.
I am willing to build an email application which runs on the server side.
Not being familiar with any particular server I wonder if I can get some recommendations based on experience.
I have seen many great startups which built some neat apps on the email platform (for instance, friendfeed's notification mechanism, or surely posterous which mail is at the heart of their business logic), and wonder about which mail server have they found easy to learn and integrate with.
PS:
MS Exchange or any other not open-source are not an option
Must run on linux
I'm getting the following line in the disassembly from objdump -d of an x86 linux program...
4000b0: ba 0e 00 00 00 mov $0xe,%edx
I'm trying to understand how the machine code "ba 0e 00 00 00" maps to "mov $0xe,%edx"
In the manual move immediate 32-bit is:
B8 + rd ... MOV r32, imm32
ie "B8" not "BA"
In fact none of the MOV opcodes are "BA".
If someone could break down "ba 0e 00 00 00" and explain bit-wise how to get to "mov $0xe,%edx" it would be most helpful.
In the beginning of a file on my server (linux), which is located in the /etc/init.d/ folder I have this line:
!/bin/sh -e
What does it mean, because every time I execute the rest of the script it works fine except for an error which shows:
!/bin/sh not found
Any ideas?
This is a totally newbie question. I'm running Eclipse on Ubuntu. I created a test project that I want to compile to an executable (whataver the linux equivalent is of a Windows .exe file). Here's the contents of my program:
public class MyTest {
public static void main(String[] args) {
System.out.println("You passed in: " + args[0]);
}
}
I want to know how to compile it and then how to execute it from the command line.
Thanks!
I'm developing application that will read messages from IMAP server.. what would you recommend for local development/testing (easy configurable light server)
Platform - Ubuntu Linux
Hi guys,
I've a lot of websites (100+ directories) I want to create a unique zip with only public subdirectory.
My structure now is like:
- Site 1
--- app
--- tmp
--- log
--- public
- Site 2
--- app
--- tmp
--- log
--- public
- ... 100+ dirs ...
Now I need a unique zip and then after unzip it I want to see this structure:
- Site 1
--- public
- Site 2
--- public
- others
Any suggestion how I can do that with linux commands zip/tar ?
Thanks so much!
I use Solr in my website, and now I am about to configure my VPS account.
I am at the stage where I need to install java in order to make Solr work.
Now, I only plan on running solr, and using it as it is (I have no java programming skills at all), so my Q is, do I need the entire JDK which includes JRE, or is JRE enough?
Thanks
BTW: My server OS is Linux (ubuntu 9.10).
Thanks
I am looking for a way to monitor a Linux mbox email account, when an email arrives I would like to download an attachment from the email and save the attachment (CSV file) so that it may be used by a PHP script. What would be the best way of going about this? I have looked at PHP's IMAP functions but this does not appear to be the most appropriate method when a simple bash script may be all that is required?
Hi,
I'm having a bit of a strange problem with an application using the Files.probeContentType(path)-method to test for file type: On both my Ubuntu and Fedora systems, it works fine, but when moved to a RedHat Enterprise server (2.6.18-194.el5 #1 x86_64 x86_64 x86_64 GNU/Linux), it only returns null. I'm using java 7 early access (1.7.0-ea-b84). I have to use this version due to functionality that isn't included in 1.6.
Does anyone have an idea of what might be the problem here?
I am working with telecom company. I am familiar with Java programming language. But now I have a task to write a script, with Linux operating systems. I have to write a script for fetching data from other computer and check some conditions. How can I do that using Java?
i'd like to put a kind of lock file in the user's home directory on linux(from c++) but fopen'ing ~/.fluudit doesn't seem to work.
fopen("~/.fluudit","w"); //fails
I am writing a linux kernel module that needs to pin two threads on two different cpus. I am planning to use sched_setaffinity() after exporting it in the kernel. Is there any other exported function for the same ?
Also, if I set only 1 CPU in the cpumask, will the thread be moved to that cpu with immediate effect ? If not, how do I enforce the same ? Will it help to call schedule() just after sched_setaffinity() ?
I have a VPS server, and have trouble setting up java.
I wonder, is there any way to test to see if java works?
My VPS server is Linux and I use PuTTY to communicate with the server from my own windows computer.
Thanks