Sponsored Content
Top Forums Programming Adding custom ("Hello") system call: help Post 302487603 by courteous on Thursday 13th of January 2011 03:13:24 AM
Old 01-13-2011
"Hello!" IS in dmesg but NOT in /var/log/messages

Yes, 'hello' is in System.map (in /boot directory):
Code:
c015c3c0 T sys_hello

Yes, I did reboot (into the new kernel). Smilie

As 'hello' is in System.map, does that mean that something is wrong with the test function helloTest.c? Smilie

EDIT: dmesg* does print "Hello!" on the last line, but there is nothing in /var/log/messages file.


* dmesg - prints or controls the kernel ring buffer


EDIT2: I've compared output of dmesg and tail -f /var/log/messages commands: equal lines are in bold red, Hello! is the last line of dmesg.
Code:
blaise@blaise-E520 ~/Documents/seminar $ dmesg
[ 5364.127763] [... snipped... ]
[ 5379.250373] usb 2-3: USB disconnect, address 4
[10619.880053] usb 2-3: new high speed USB device using ehci_hcd and address 5
[10620.016622] scsi6 : usb-storage 2-3:1.0
[10621.889492] scsi 6:0:0:0: Direct-Access     USB      FLASH DRIVE      1100 PQ: 0 ANSI: 0 CCS
[10621.891282] sd 6:0:0:0: Attached scsi generic sg2 type 0
[10621.897073] sd 6:0:0:0: [sdb] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
[10621.897837] sd 6:0:0:0: [sdb] Write Protect is off
[10621.897841] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[10621.897844] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[10621.901956] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[10621.901964]  sdb: sdb1
[10621.905319] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[10621.905324] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[10645.191905] usb 2-3: USB disconnect, address 5
[11121.593000] Hello!
blaise@blaise-E520 ~/Documents/seminar $ tail -f /var/log/messages
Jan 13 14:56:59 blaise-E520 sudo: pam_sm_authenticate: username = [blaise]
Jan 13 15:15:04 blaise-E520 kernel: [10619.880053] usb 2-3: new high speed USB device using ehci_hcd and address 5
Jan 13 15:15:04 blaise-E520 kernel: [10620.016622] scsi6 : usb-storage 2-3:1.0
Jan 13 15:15:06 blaise-E520 kernel: [10621.889492] scsi 6:0:0:0: Direct-Access     USB      FLASH DRIVE      1100 PQ: 0 ANSI: 0 CCS
Jan 13 15:15:06 blaise-E520 kernel: [10621.891282] sd 6:0:0:0: Attached scsi generic sg2 type 0
Jan 13 15:15:06 blaise-E520 kernel: [10621.897073] sd 6:0:0:0: [sdb] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
Jan 13 15:15:06 blaise-E520 kernel: [10621.897837] sd 6:0:0:0: [sdb] Write Protect is off
Jan 13 15:15:06 blaise-E520 kernel: [10621.901964]  sdb: sdb1
Jan 13 15:15:06 blaise-E520 kernel: [10621.905324] sd 6:0:0:0: [sdb] Attached SCSI removable disk
Jan 13 15:15:29 blaise-E520 kernel: [10645.191905] usb 2-3: USB disconnect, address 5

Why isn't Hello! also printed in /var/log/messages? Smilie

Last edited by courteous; 01-13-2011 at 10:40 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

Adding custom mesg. when redirecting "exec 2>stderr.err" ?

Doubt regarding using "exec" command to redirect the STDERR to a file. e.g I did it this way. mystage.sh #!/bin/sh exec 2>stage.err .... .... cat stage.err mv: cannot move `/root/stage' to a subdirectory of itself, `/root/stage_old/stage' ls: *.zDB: No such file or... (0 Replies)
Discussion started by: snurani
0 Replies

3. Programming

Problem with socket binding - "system" call

Hi, I am having an issue with using sockets. I have a program which binds to a socket and listen on it. Later I spawn a thread to handle some function. In the new thread created I need to call a shell script which executes the specified function. Here I am using a system command to call the... (5 Replies)
Discussion started by: Janardhanbr
5 Replies

4. IP Networking

Configure a range of ports to "socket" system call

Hello ; This what i want to do : I know that in the system call #include <sys/socket.h> int bind(int socket, const struct sockaddr *address, socklen_t address_len); you can specify the local port for your socket, but im using a private library , and im sure that in that library... (0 Replies)
Discussion started by: trutoman
0 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Post Here to Contact Site Administrators and Moderators

Suggestion: adding two new groups "sed" and "awk"

Majority of the questions are pertaining file/string parsing w.r.t sed or awk It would be nice to have these two as their own sub category under shell-programming-scripting which can avoid lot of duplicate posts. (1 Reply)
Discussion started by: jville
1 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

awk "date" and "system" command

Hello experts! I need your help please I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.: 2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well. So I want to execute date -d '2016-11-25 03:14:50' ... (2 Replies)
Discussion started by: phaethon
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies
All times are GMT -4. The time now is 06:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy