Programming :: How To Configure And Use The Host To Boot A Test Kernel
Mar 8, 2011
I want to learning and developing the kernel on the practice(not kernel module). What are some ways to boot the test kernel on the same system(with stable kernel) where I`m building a test kernel for debugging purposes.
How to configure and use the host to boot a test kernel then I can boot the system(with stable kernel) and fix the test kernel.
I want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":
/*----------Start of mycall.c----------*/ #include <linux/linkage.h> #include <linux/time.h> #include <linux/kernel.h>
[code]....
so i want a method to test the new system call before compiling kernel.
My organization is running a VMware vSphere based platform. On top of that we have a Sun Gridengine cluster consists of a number of ubuntu VMs.At the moment, we deploy new cluster nodes from the VM template. Although it already saves us lots of time, we still need to configure the network, host name, register DNS record manually.In a near future, we will need to add 100+ more hosts to the cluster. So we are seeking a automated deployment so that a VM does the following during its first boot:
1)configure the network for the correct IP with DHCP or manual.
2)request a designate host name (maybe from a pre-defined datasource?) and configure host name.
3)register itself to our DNS servers.
We don't really have experiences for running big cluster. So welcome to share your opinions and experiences.Specially I'd very keen to find out if there is any well-proven solution right there or I will need to implement from the scratch.
is it possible using a perl script to test for a socket listening on a UDP port on a remote host ?I work in an environment where netcat is not allowed and from time to time I need to see if a UDP port is open on a remote host.
this is a dual boot XP/UBUNTU 10.04. while using XP, the computer rebooted itself. the GRUB's screen appears, but neither the ubuntu nor the XP option works.
Ubuntu gives this error message:
Code: 0.797795 kernel panic-not syncing: vfs: enable to mount root fs on unknown-block (0,0)
XP hangs on a black screen... and that is it (thanks for support windows!) UBUNTU 10.04 live CD hangs when the 5 processing dots appears bellow the ubuntu logo. hangs the same way with the processing bar in UBUNTU 9.04 live CD. memory check (memtest86) is showing thousands of errors right from the start.
this issue which has suddenly occurred on both my Desktop and my Laptop. When I try to configure an IP address to any interface I get the following error....
I get this for ethernet interfaces as well. I do not understand what is different as I was able to configure the ip address only the day before yesterday on the laptop..? The Desktop has had this issue for about 3 weeks now.
I am trying to set up sendmail on my intranet (home) webserver, so that it will send mail via my ISP. I have searched for similar threads including this thread, but the responses do not seem to have solved the problem. All I want is to call sendmail from Perl, to post myself the responses to a test form I am building, using my normal internet mail address. I do not want to receive or relay mail from any host except the web server itself (127.0.0.1).
I have edited sendmail.mc to define SMART_HOST as my isp's mail server and MASQUERADE_AS to be my local network name (which is not a registered domain - it is just the name I have given my home intranet). I have run make and built a fresh sendmail.cf, then restarted sendmail.
Using my form, I am able to submit the message to sendmail, but after 40 seconds the mail log shows a message
I have setup CentOS 5.2 with Nagios to monitor my network and have that configuration almost done. I have also setup Sendmail to forward all mail (really only Nagios notifications) out to my Exchange server using define('SMART_HOST', 'exchange.domain') in the sendmail configuration file and it seems to be working correctly.is there a way to configure Sendmail to forward all mail out through my Exchange server as it is now but send mail out to the internet itself if the exchange server is unavailable, somewhat like a failover configuration.
I've been for a while trying to configure my apache to host 5 domains as virtualhosts in the same IP address, but seems that neither one makes it through... it always takes first one, because it is the default:
I want to copy files from an incoming directory, but don't want to copy a file if it hasn't finished being written. I thought of using fuser, but it doesn't seem to be very reliable. I vi'd a file in one window and then ran fuser against the file name and got nothing back. I'm just writing a simple bourne script on RHEL.
dammit... all that typing and I hit the wrong "submit" button. *sigh*
Ok, I have a couple of SMTP servers for our infrastructure. They are running Postfix. I have them configured so that specific email addresses such as support@mydomain.com and billing@mydomain.com all go to a new support server that I am building with osTicket. Lets call that server SUPP1.
SUPP1 runs sendmail from the default install of CentOS 5 i386. At this point everything runs great. New emails get added into the osTicket system via a pipe in sendmail. Here's where the problem comes in. In order to accept mail, sendmail has to have the domain listed in local-host-names and the addresses in virtusertable. That works just dandy. But in doing so, sendmail believes it is the destination SMTP server for "mydomain.com". That means that I can't send mail from that server back into my normal SMTP servers. So things like the LogWatch, cron jobs, etc can't send notifications. Is there a way to work around that? For sendmail to ignore local-host-names for outbound email or something?
I wrote a test program to get the CPU utilisation. I hope to extend it to take cpu utilisation on multi core machines. Hear I used the equation for taking cpu utilisation given at [url] of JmSchanck post. But when I match the output of my program against 'top' and 'system monitor' output it seems quite high. Sometimes cpu utilisation goes more than 100%.
So the given equation in that url is correct? can anyone give me the equation to take CPU utilisation?
I am trying to use a shell script to find a string in a file and do something when found. code...
What should happen is pppd will start in a different process and stream it's output to pppdout. pppdout should be created in the current folder. Then the script should periodically check the pppdout file for the string Script (which eventually will appear, some seconds later) and when found exit the script. Ultimately the script will do something useful when the text is found. However, the output from the program is a repeating: 'scriptname.sh: 12: FOUND: not found'
Where scriptname.sh would be the name of your script and 12 refers to the line with 'done'.
Why does grep not find the text, or at least why deos my script not check the grep output correctly?
I wanted to make some modifications to a Kate plugin, so I cloned the git repository, started doing a few changes, and it compiled. The problem is that when I run it, it uses the version of the plugin installed in the system, not the one compiled with Kate.
I've been reviewing some source code recently which contains many conditional compilation statements, and I found it hard to understand the code not knowing whether some macro is defined or not. Is there any way to test whether a macro is defined?
I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and to explain more clear, My program is a sample database for modify or add and search and it read data from a binary file and also write into a binary file. I have got an input from my lecture and she said after compiling in Linux I must write:
1-to compile: Code: g++ (files with cpp) 2-to see the output: Code: ./a.out 3-to test with input: Code: ./a.out < input.txt >
My problem is in step three. What I must write in the command part after" step2" to see the output?
In either method, the script process doesn't seem to connect to init process, when I checked using pstree command. I thought, the disown or nohup command detaches the process from its parent and attaches it to grand grand parent init process. And it disables SIGHUP signal to my script process. But the pstree command didn't show me what I expected. It still shows my script process attached to my current terminal process. I just don't understand the concept behind these two commands (nohup and disown). Is there any way, I can see the list of processes that are run by nohup or disown command?
In my perl script I'd like to test if a string is written in uppercase letters or not. How can I do that? This type of test don't seem to work, so there must be other ways of doing this:
Code:
...return true.
I can create a subroutine that compares each character aginst a list of uppercase letters, but I'm hoping there's allready a build in routine in perl that does this...
I'm trying to do the following. from a php webpage click on a link, that opens a shell/cmd and runs an open ping to the device. so it must actually open a shell (for linux) or cmd (for windows) and run a ping to the specified ip. Currently i'm running an exec command, but for this i need to wait for the result to be fetched and print it out. I want to monitor it in realtime, by just clickingon the button. How to get this working?
I wrote a test app that scans for plugins in a directory, calls their getWidget() method (implemented in my interface), and adds that widget to a layout.
The problem is that when I added a QTimer to my plugin class, it didn't work! Why?
And will it be easier to write the thing in Python and not use QPlugin? I just want to define a QWidget and have it added to the app.
I am exploring the Python 3 standard library and am currently attempting to test the bin function. It converts an integer into a binary string. I believe the module I wrote is flawed somehow. Here's the source code:
Code:
#!/usr/bin/python3.1
#This module tests the bin() function.
import sys def get_input(): x = input("Enter an integer: ") def use_bin():
[code]....
As you can see, the binary form given is always 0b10111. I'm no expert on binary code (or hexadecimal notation), but surely 9000 and two would have different results?
EDIT: Added a line in the module to repeat back what integer the user entered, and then the binary form. It would appear that no matter what integer the user enters, Python thinks it's "23".
Example output:
Code:
>>> Enter an integer: 1 You entered 23 The binary form of this integer is 0b10111 >>>
I'm writing a code to get the index of the last occurrence of a given substring in a string.
Code: int StringHandler::lastIndexOf(string src, const string s) { unsigned int lastIndex = string::npos; if (src.find(s, 0) == string::npos) { return -1; } else { bool isLast = false; unsigned int i = 0; do { lastIndex = src.find(s, i); if (lastIndex != string::npos) { i = lastIndex + 1; if (i == src.size()) { isLast = true; } } else { isLast = true; } } while (!isLast); } return lastIndex; }
My problem is: execution steps into an if with a false condition! Check the values of i and src.size() at the right panel. How could be possible for the program to run the highlighted statement? The if condition above is false! [URL]. I could use char arrays, for example, but this kind of false validation has happened to me more than once, I'm using G++ 4.5 with these flags: -O0 -g -Wall -c
I notice a bunch of weird what appear to be hard drive related error messages on my Linux server:
Code: May 16 19:07:38 ghost kernel: [ 3495.452698] ata3.00: configured for UDMA/33 May 16 19:07:38 ghost kernel: [ 3495.452706] ata3: EH complete May 16 19:07:40 ghost kernel: [ 3497.380640] ata3.00: configured for UDMA/33 May 16 19:07:40 ghost kernel: [ 3497.380648] ata3: EH complete May 16 19:07:44 ghost kernel: [ 3501.732973] ata3.00: configured for UDMA/33
please use /proc/5073/oom_score_adj instead.
I don't know if this could be an indication that my hard drive(s) are about to fail. Can someone tell me if there's a way to test the drives or understand what's causing this error?
I am fairly new to bash scripting, and I am trying to test a variable against a number range (1-3). This is what I have used so far: The user enters a value, then
And what I'd like is to have the files renamed like this:
Code:
How could I code it so that it removes the numerical part of the filename (at the beginning), even with different patterns (like the 01 - artist vs the 01-artist)?