9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Problem with outputing from kernel
@ 2023-10-04 11:18 dusan3sic
  2023-10-04 15:23 ` ori
  2023-10-04 16:56 ` Kurt H Maier via 9fans
  0 siblings, 2 replies; 4+ messages in thread
From: dusan3sic @ 2023-10-04 11:18 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

I added some logs in /sys/src/9/port/proc.c for some tests of the scheduler, I want to see at what moments do real time processes take the cpu. I did that with simple prints with the intention of doing cat /dev/kmesg > someFile because all the prints are stored there.  

The problem is that the flow of output just randomly stops at times and continues(only once by test) and i lose some of the output  which is really important. Any ideas why?

Also I was doing with tail -f /dev/kmesg in the background and without that /dev/kmesg loses the start of output up to some random moment where it shows it. Could the problem be that i have too many outputs?
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T31db04ef89737d25-Ma028dd0e821a763795e71625
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1453 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Problem with outputing from kernel
  2023-10-04 11:18 [9fans] Problem with outputing from kernel dusan3sic
@ 2023-10-04 15:23 ` ori
  2023-10-04 16:56 ` Kurt H Maier via 9fans
  1 sibling, 0 replies; 4+ messages in thread
From: ori @ 2023-10-04 15:23 UTC (permalink / raw)
  To: 9fans

Quoth dusan3sic@gmail.com:
> I added some logs in /sys/src/9/port/proc.c for some tests of the scheduler, I want to see at what moments do real time processes take the cpu. I did that with simple prints with the intention of doing cat /dev/kmesg > someFile because all the prints are stored there.  
> 
> The problem is that the flow of output just randomly stops at times and continues(only once by test) and i lose some of the output  which is really important. Any ideas why?

are you printing from an interrupt context? use iprint for that.

also, are you looking for trace(1)? we ship with a tool for showing
scheduler decisions.

> 
> Also I was doing with tail -f /dev/kmesg in the background and without that /dev/kmesg loses the start of output up to some random moment where it shows it. Could the problem be that i have too many outputs?

that's what tail *does*. It shows the tail (by default, last 10 lines) of the file.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T31db04ef89737d25-M5f99acee5813b799ce86afe6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Problem with outputing from kernel
  2023-10-04 11:18 [9fans] Problem with outputing from kernel dusan3sic
  2023-10-04 15:23 ` ori
@ 2023-10-04 16:56 ` Kurt H Maier via 9fans
  2023-10-09 18:37   ` dusan3sic
  1 sibling, 1 reply; 4+ messages in thread
From: Kurt H Maier via 9fans @ 2023-10-04 16:56 UTC (permalink / raw)
  To: 9fans

On Wed, Oct 04, 2023 at 07:18:23AM -0400, dusan3sic@gmail.com wrote:
> Also I was doing with tail -f /dev/kmesg in the background and without that /dev/kmesg loses the start of output up to some random moment where it shows it. Could the problem be that i have too many outputs?

try tail +0f /dev/kmesg

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T31db04ef89737d25-M0e9be2ef226b9b14bee99193
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] Problem with outputing from kernel
  2023-10-04 16:56 ` Kurt H Maier via 9fans
@ 2023-10-09 18:37   ` dusan3sic
  0 siblings, 0 replies; 4+ messages in thread
From: dusan3sic @ 2023-10-09 18:37 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

https://9p.io/wiki/plan9/avoiding_screen_pollution_from_kernel_messages/index.html
this helped
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T31db04ef89737d25-M6bbf54d0c44e0b1751ec3632
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 918 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-09 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 11:18 [9fans] Problem with outputing from kernel dusan3sic
2023-10-04 15:23 ` ori
2023-10-04 16:56 ` Kurt H Maier via 9fans
2023-10-09 18:37   ` dusan3sic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).