Code Monkey home page Code Monkey logo

Comments (13)

vgropp avatar vgropp commented on May 26, 2024

just a wild guess without currently being able to check it, -D need #ifdef HAVE_FORK, is it enabled in your config.h?
There should be flushing using fflush (https://www.freebsd.org/cgi/man.cgi?query=fflush&sektion=3&apropos=0&manpath=freebsd), are other outputs working (rate, etc)?

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Hello,

For fork(), please notice I did not install the port from source tree but from pkg. However, I could build it if you wish.

For both issues, I could also have updated the code to flush data upon write (simple setting output buffer to zero btw).

Because of that, I think it was best to raise you an issue, so you can setup a generic solution (forced flush, new argument...) for FreeBSD.

If you want I try to solve that by myself, just tell me.

Thanks

Brgrds

from bwm-ng.

vgropp avatar vgropp commented on May 26, 2024

I welcome PR especially for non linux systems.

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Ok, I reinstall it from source ports tree.

Upon correction, I'll submit them to the maintainer per FreeBSD process, giving you the diff as well :-)

I also have a suggestion : sometimes disk is overloaded with IOps. Maybe a IO option for bwmng ? :-)

+++

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Hello,

Ok, I updated output.c, after your switch of output_method (line 254 on 570), simply adding fflush(tmp_out_file):

    // Laurent LEVIER patch for FreeBSD to force immediate flush of written data
    fflush(tmp_out_file);

It demonstrates the solving of the issue for this point.
However, looks like a dirty work to me, it might not be needed at all times.
I would suggest to add -f flag to fflush stream when needed. What do you think ?

Still the -D issue, I'll check that now.

+++

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Hello,

Maybe I mistake but to me there are many issues with bwmNG under FreeBSD 13. Let me summ some I saw and sometimes handled:

1- device names are not correct. I just get 'da', without its logical value, and so I cant select a specific device

2- The fflush() is now an -z option to force flush at write time. So anyone can manage :-)

3- -D fails but under FreeBSD the 'daemon' command handles this bug, so I took no action.

4- There are bugs in the getopt management. For example I set -d -F, output normally fails but in real bwmNG should report -d is missing a value... I did not managed this, just detected.

Here are the patches I created.
Please advise if you integrate them into your code, meaning I will not send them to the FreeBSD port maintainer:

patch-src__defines.txt
patch-src__global_vars.txt
patch-src__input__devstat.txt
patch-src__options.txt
patch-src__output.txt

Thanks

Brgrds

from bwm-ng.

vgropp avatar vgropp commented on May 26, 2024

Hi, can you create a github Pull Request? Merging would be easier that way. https://gist.github.com/Chaser324/ce0505fbed06b947d962

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Hello,

I am not truly familiar with this git stuff and the URL you give is for maintainer, not anonymous public.
I just use git for my CyberRange, but as owner of the branch, much easier :-)

At the moment, I am able to submit the changes to you but:
git push --set-upstream origin freebsd13-llevier

remote: Permission to vgropp/bwm-ng.git denied to llevier.
fatal: unable to access 'https://github.com/vgropp/bwm-ng.git/': The requested URL returned error: 403

from bwm-ng.

vgropp avatar vgropp commented on May 26, 2024

ok, ill look into the patches later

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

no pb.
FYI, each patch applied perfectly into the git as well (in case FreeBSD was not taking it another way).

Please keep me posted so I know the end of the story :-)

from bwm-ng.

llevier avatar llevier commented on May 26, 2024

Hello,

Got some feedback for me ? :-)
It would also be a great new source of infos to collect disk I/O.
It is a major bottleneck most of times missed (disk bandwidth is not everything) :-)

Thanks

Brgrds

from bwm-ng.

vgropp avatar vgropp commented on May 26, 2024

not yet, but its on my todo list

from bwm-ng.

vgropp avatar vgropp commented on May 26, 2024

hi,
sorry for the long delay, i included the devstat device number fix and change the fflush() a bit to not use in when printing the header but always flush with CSV or HTML out as this seemed to be missing. Does it fix your output issue?

I did not get your -z option, it was set but never used in your patches

from bwm-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.