Page 33 of 98 FirstFirst ... 2331323334354383 ... LastLast
Results 321 to 330 of 978

Thread: Inspired

  1. #321
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Inspired

    Some example code for dealing with logging() ... I'm not suggesting this should be used at all, just showing how to deal with output file vs no outputfile needs.
    Code:
    function Logging(){
      if [[ "true" == "$LOGOPT" ]] ; then
        echo "
    INFO: $1 " | $TEE -a $LOG
      else  # No logging
        echo "
    INFO: $1 " 
      LOG=/dev/null
      fi
    }
    We all have an itch, right? This function ties into my info-gathering script.

  2. #322
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    @TheFu

    I played with it and added what I changed it to in... Also added the HWE info and changed the warning background coloring...
    Code:
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git add system-info
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git commit -m "Changed warning background color. Added Logging. Added HWE functions."
    [main d68c224] Changed warning background color. Added Logging. Added HWE functions.
     1 file changed, 118 insertions(+), 82 deletions(-)
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git push
    Enumerating objects: 5, done.
    Counting objects: 100% (5/5), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 1.69 KiB | 575.00 KiB/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
    remote: This repository moved. Please use the new location:
    remote:   https://github.com/Mafoelffen1/system-info.git
    To https://github.com/MAFoElffen1/system-info
       f5084a6..d68c224  main -> main

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #323
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    Is this ready for a "Release" and push to UbuntuForums/system-info?

    Code:
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git add system-info
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git commit -m "Added Help usage panel."
    [main 7cfe7c4] Added Help usage panel.
     1 file changed, 32 insertions(+), 2 deletions(-)
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git push
    Enumerating objects: 5, done.
    Counting objects: 100% (5/5), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 1016 bytes | 508.00 KiB/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
    remote: This repository moved. Please use the new location:
    remote:   https://github.com/Mafoelffen1/system-info.git
    To https://github.com/MAFoElffen1/system-info
       d68c224..7cfe7c4  main -> main

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  4. #324
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    I made a few more commits to both polishing up the brass on it.

    Tonight I contacted the Forum's Admin's and told them that it is ready to be announce as released on the Forum.

    Now for the myriad of combinations of the things to come... Finger's Crossed. LOL

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #325
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Inspired

    Quote Originally Posted by MAFoElffen View Post
    I'm seeing that it is displaying the file names that are there, with no contents from them, because of the filter on that- It first strips out any commented lines, then strips out any blank lines, then formats... But since there was nothing left to display, it just showed the file names with no contents. Hmmm. That still makes sense to me.

    To do that differently:
    I would have to read each file individually while keeping the file name > Process what needed to be displayed from that file. > Count the lines of what is left to display, before determining if it is to be displayed... But it would not show that there 'are' files that are empty (such as everything commented out like yours), unless I also added the logic to display that as an alternate message to indicate that.

    Do you all want me to change it in that manner? We know what that means when it does that... Do I need to spell that out clearer by breaking that apart and adding the logic to that?
    Nope.

    I found it rather useful; a single line I probably would have overlooked & dismissed; the multiple lines made me spend more time looking at the mess my sources have become.

    All the duplication I saw in my sources - was the result of the way I do things.. and I have no issues with it. I'd expect most users won't have the duplication I see on my primary box (I won't on most of my other boxes either)

    Thank you, the tool is nifty & very useful.

  6. #326
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Inspired

    Seeing this, which has nothing at all to do with my install, seems odd.

    Code:
    --- HWE Kernel Reference:
    For HWE Package: linux-image-generic-hwe-20.04, Kernel Version: 5.11.0.34.36
    For HWE Package: linux-image-generic-hwe-20.04, Kernel Version: 5.4.0.26.32
    
       --- HWE Package Status:
    HWE package linux-generic-hwe-20.04 was not detected. Please check 
    kernel version to verify range
    Not really a complaint, just something to consider. Showing what is possible, not what is actually there? This is a philosophical choice. By showing what is possible, many cans are opened. This is like how some US states put road signs AFTER the point they are needed. Many states have standards that mandate a road sign **must** be placed BEFORE it ... like an exit sign. It prevents confusion, but being consistent is the most important.

    The above output makes it seem like I should install linux-generic-hwe-20.04, which is definitely NOT something I want. Quite happy with 5.4.0-84-generic. Why would I want 5.4.0.26.32 (which is older than my current) or 5.11.0.34.36 (which is so new and seems to be causing compatibility with some network drivers)?

    In the df -h section, should df -ih also be added? Running out of inodes happens, not often, but often enough that it should be known and considered. Mainly happens on smaller file systems. Just a thought. I check this whenever there is an out-of-space issue.

    I haven't said this publicly, but for the RAM output, anyone running a Ryzen system having reboots will definitely want to see more detailed information about the RAM. The number of sticks, the size of each and the current speed. Ryzen can be extremely picky about RAM speeds and speeds that worked last year may need to be slowed this year with the 5.4.x kernels. I've had that exact issue.

    Lastly, if this is for experts to help, being minimalist - no fluff - is important. Get to the point, show the commands and data.
    If this is for noobs to follow, then longer explanations or links to explanations would be helpful.

    Not a bad tool as it is now.

  7. #327
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Inspired

    Quote Originally Posted by MAFoElffen View Post
    I was holding the commit until I got some feedback first... But pushed it just now so you can see them.
    Code:
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git add system-info
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git commit -m "Put debug code back in as comments."
    [main 0a1b047] Put debug code back in as comments.
     1 file changed, 13 insertions(+), 3 deletions(-)
    mafoelffen@ubuntu:~/git/MAFoElffen1/system-info$ git push
    Enumerating objects: 5, done.
    Counting objects: 100% (5/5), done.
    Delta compression using up to 4 threads
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 454 bytes | 454.00 KiB/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
    remote: This repository moved. Please use the new location:
    remote:   https://github.com/Mafoelffen1/system-info.git
    To https://github.com/MAFoElffen1/system-info
       ebc6e10..0a1b047  main -> main
    That is with that DEBUG/TEST code still commented out in the paste methods and Paster()...

    That is without what was mentioned in post #309 as an addition.
    Well, I must be doing something wrong, because I haven't been able to make things work to show the extra information. So, I'll step out of the request for feedback on this one.

    I lot has happened since this, so I'll catch up to current and try it.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  8. #328
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Inspired

    @TheFu
    Lastly, if this is for experts to help, being minimalist - no fluff - is important. Get to the point, show the commands and data.
    If this is for noobs to follow, then longer explanations or links to explanations would be helpful.
    I thought about that... Including the logger functions, the way I modified them, I can start adding some background things to it, without actually changing how the script runs or behaves. To show different things by just changing the log level. I know you want to see the commands and what it going on in the background. That is not good for non-technical users.

    You are on one side of this, where you need to understand what is going on, and what is being asked, so that you know where the answers are coming from... And how those answers are being determined. If this were a GUI, I would show the background messages in a display task-bar somewhere on the panel... But this is a console script. Even at that, resusing processes, which some do multiple things, in different ways, based on the conditions, it is over 1000 lines, and still growing. For user's, it can't be too complex to use.

    Now that the functionality is there, we can expand on the messaging, and making things more clear on what things mean. Such as, the "why" we are looking at that information, and what it means.

    @Doug S
    I haven't been able to make things work to show the extra information.
    I'm confused. What request did you have on more information shown, where, when and how? I'm listening...

    I sent you a PM Doug... I put the Debug code back in, but had it commented out, so that it didn't show in the "release" of the script to users. Then I included the logger functionality, and transformed the debug statements to use that logger functionality... I will explain that to you in PM, so I can answer all your questions on that.

    Why the logger functionality?

    Well, I think we could exploit the changing levels of that to turn on more detailed messaging and verbosity... I feel it can be done without changing how the script works and functions. I can go back and put all my debug statements back on what is being passed where and when. We can add more detailed messaging, in different forms... And changing the verbosity would affect what is shown, how and when. Just as, for a seasoned Technical Power User, or for a Newbie who needs lots of help.

    Or is that too much? I released the script to users... It's in the Admin's hands now to announce it to the Forum. It is a tool. We can still make it better to appease what you want out to get out of it.

    I think it has a good foundation right now.

    EDIT:
    I just discussed with sudodus, that maybe some of this (above) is where we need to start working on a Wiki for the UbuntuForums/system-info Repo, to explain those kinds of things... Where the explanation of, doesn't necessarily affect the functionality of the script itself, but explains it, in more detail(?).
    Last edited by MAFoElffen; September 16th, 2021 at 09:23 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  9. #329
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Inspired

    Quote Originally Posted by MAFoElffen View Post
    @TheFu

    I thought about that... Including the logger functions,
    <snip>
    Clearly stated.

    Think addressing newer users and experts via logging will be an elegant solution. Sorta like an expert mode, but without the hassles that would entail. I'll probably steal this idea for my itch too.

    Good thoughts. Better than imagined.

  10. #330
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,515
    Distro
    Ubuntu Development Release

    Re: Inspired

    Quote Originally Posted by MAFoElffen View Post
    @Doug S

    I'm confused. What request did you have on more information shown, where, when and how? I'm listening...

    I sent you a PM Doug... I put the Debug code back in, but had it commented out, so that it didn't show in the "release" of the script to users. Then I included the logger functionality, and transformed the debug statements to use that logger functionality... I will explain that to you in PM, so I can answer all your questions on that.
    Sorry for the confusion. And thanks for the help from both you and sudodus via PMs.

    I was just still trying to test and compare so that I could reply to your questions in post #308. In my post #310, I explained my lack of success. Things have moved on, so lets forget it.

    I haven't been able to figure out how to make the logging levels work or not work. I'll just wait until it's (logging) all finalized and try it then.
    Last edited by Doug S; September 17th, 2021 at 10:26 PM.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Page 33 of 98 FirstFirst ... 2331323334354383 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •