Systemctl status always shows full log, even with --lines












3















1So, I'm trying to get the status of a unit, but only the first 3 lines like this:



systemctl --user status resilio-sync --lines=3


I've tried various variations of this with -n 3 etc..., nothing works.
And the strange part: it always shows the full log (13 lines), instead of 10 lines which should be the default according to the documentation for systemctl.



Trying systemctl status confirms this: it just outputs all 45 lines to the terminal, when it actually should be 10.



Am I missing something here? As far as I know I didn't change anything.



As a workaround I'm currently using



systemctl --user status resilio-sync | sed -ne '1,3p'


but I'd rather like to fix the underlying problem and use the native command.
System is Kali Linux (re4son-kernel, sticky fingers) on a Raspberry Pi (easy to blame on this strange setup, but since this is core linux functionality I don't think it should matter)
[Output of the first command]










share|improve this question









New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Welcome , Please add the output of the first command.

    – GAD3R
    2 days ago






  • 1





    added it as a picture as I don't have the other machine connected to the internet atm.

    – Bauglir42
    2 days ago
















3















1So, I'm trying to get the status of a unit, but only the first 3 lines like this:



systemctl --user status resilio-sync --lines=3


I've tried various variations of this with -n 3 etc..., nothing works.
And the strange part: it always shows the full log (13 lines), instead of 10 lines which should be the default according to the documentation for systemctl.



Trying systemctl status confirms this: it just outputs all 45 lines to the terminal, when it actually should be 10.



Am I missing something here? As far as I know I didn't change anything.



As a workaround I'm currently using



systemctl --user status resilio-sync | sed -ne '1,3p'


but I'd rather like to fix the underlying problem and use the native command.
System is Kali Linux (re4son-kernel, sticky fingers) on a Raspberry Pi (easy to blame on this strange setup, but since this is core linux functionality I don't think it should matter)
[Output of the first command]










share|improve this question









New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Welcome , Please add the output of the first command.

    – GAD3R
    2 days ago






  • 1





    added it as a picture as I don't have the other machine connected to the internet atm.

    – Bauglir42
    2 days ago














3












3








3








1So, I'm trying to get the status of a unit, but only the first 3 lines like this:



systemctl --user status resilio-sync --lines=3


I've tried various variations of this with -n 3 etc..., nothing works.
And the strange part: it always shows the full log (13 lines), instead of 10 lines which should be the default according to the documentation for systemctl.



Trying systemctl status confirms this: it just outputs all 45 lines to the terminal, when it actually should be 10.



Am I missing something here? As far as I know I didn't change anything.



As a workaround I'm currently using



systemctl --user status resilio-sync | sed -ne '1,3p'


but I'd rather like to fix the underlying problem and use the native command.
System is Kali Linux (re4son-kernel, sticky fingers) on a Raspberry Pi (easy to blame on this strange setup, but since this is core linux functionality I don't think it should matter)
[Output of the first command]










share|improve this question









New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












1So, I'm trying to get the status of a unit, but only the first 3 lines like this:



systemctl --user status resilio-sync --lines=3


I've tried various variations of this with -n 3 etc..., nothing works.
And the strange part: it always shows the full log (13 lines), instead of 10 lines which should be the default according to the documentation for systemctl.



Trying systemctl status confirms this: it just outputs all 45 lines to the terminal, when it actually should be 10.



Am I missing something here? As far as I know I didn't change anything.



As a workaround I'm currently using



systemctl --user status resilio-sync | sed -ne '1,3p'


but I'd rather like to fix the underlying problem and use the native command.
System is Kali Linux (re4son-kernel, sticky fingers) on a Raspberry Pi (easy to blame on this strange setup, but since this is core linux functionality I don't think it should matter)
[Output of the first command]







debian kali-linux raspberry-pi systemctl






share|improve this question









New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago







Bauglir42













New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Bauglir42Bauglir42

234




234




New contributor




Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Bauglir42 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Welcome , Please add the output of the first command.

    – GAD3R
    2 days ago






  • 1





    added it as a picture as I don't have the other machine connected to the internet atm.

    – Bauglir42
    2 days ago



















  • Welcome , Please add the output of the first command.

    – GAD3R
    2 days ago






  • 1





    added it as a picture as I don't have the other machine connected to the internet atm.

    – Bauglir42
    2 days ago

















Welcome , Please add the output of the first command.

– GAD3R
2 days ago





Welcome , Please add the output of the first command.

– GAD3R
2 days ago




1




1





added it as a picture as I don't have the other machine connected to the internet atm.

– Bauglir42
2 days ago





added it as a picture as I don't have the other machine connected to the internet atm.

– Bauglir42
2 days ago










2 Answers
2






active

oldest

votes


















5














The command systemctl status display the status of the service and the corresponding lines from journalctl, the --lines=3 will limit the displayed number of lines from the journal to 3. e,g:



systemctl --user status resilio-sync --lines=0


will display only the status of esilio-sync service without the journalctl log.




-n, --lines=



When used with status, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to 10.




To limit the output of the systemctl status command you can use options:



systemctl check resilio-sync
systemctl is-active resilio-sync
systemctl is-enabled resilio-sync


or by groupping the options:



systemctl is-active is-enabled resilio-sync





share|improve this answer





















  • 1





    ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

    – Bauglir42
    2 days ago



















2














This is what the head command was designed for.



systemctl --user status resilio-sync | head -n 3





share|improve this answer










New contributor




whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Bauglir42 is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495017%2fsystemctl-status-always-shows-full-log-even-with-lines%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5














    The command systemctl status display the status of the service and the corresponding lines from journalctl, the --lines=3 will limit the displayed number of lines from the journal to 3. e,g:



    systemctl --user status resilio-sync --lines=0


    will display only the status of esilio-sync service without the journalctl log.




    -n, --lines=



    When used with status, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to 10.




    To limit the output of the systemctl status command you can use options:



    systemctl check resilio-sync
    systemctl is-active resilio-sync
    systemctl is-enabled resilio-sync


    or by groupping the options:



    systemctl is-active is-enabled resilio-sync





    share|improve this answer





















    • 1





      ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

      – Bauglir42
      2 days ago
















    5














    The command systemctl status display the status of the service and the corresponding lines from journalctl, the --lines=3 will limit the displayed number of lines from the journal to 3. e,g:



    systemctl --user status resilio-sync --lines=0


    will display only the status of esilio-sync service without the journalctl log.




    -n, --lines=



    When used with status, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to 10.




    To limit the output of the systemctl status command you can use options:



    systemctl check resilio-sync
    systemctl is-active resilio-sync
    systemctl is-enabled resilio-sync


    or by groupping the options:



    systemctl is-active is-enabled resilio-sync





    share|improve this answer





















    • 1





      ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

      – Bauglir42
      2 days ago














    5












    5








    5







    The command systemctl status display the status of the service and the corresponding lines from journalctl, the --lines=3 will limit the displayed number of lines from the journal to 3. e,g:



    systemctl --user status resilio-sync --lines=0


    will display only the status of esilio-sync service without the journalctl log.




    -n, --lines=



    When used with status, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to 10.




    To limit the output of the systemctl status command you can use options:



    systemctl check resilio-sync
    systemctl is-active resilio-sync
    systemctl is-enabled resilio-sync


    or by groupping the options:



    systemctl is-active is-enabled resilio-sync





    share|improve this answer















    The command systemctl status display the status of the service and the corresponding lines from journalctl, the --lines=3 will limit the displayed number of lines from the journal to 3. e,g:



    systemctl --user status resilio-sync --lines=0


    will display only the status of esilio-sync service without the journalctl log.




    -n, --lines=



    When used with status, controls the number of journal lines to show, counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to 10.




    To limit the output of the systemctl status command you can use options:



    systemctl check resilio-sync
    systemctl is-active resilio-sync
    systemctl is-enabled resilio-sync


    or by groupping the options:



    systemctl is-active is-enabled resilio-sync






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited yesterday

























    answered 2 days ago









    GAD3RGAD3R

    26k1751107




    26k1751107








    • 1





      ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

      – Bauglir42
      2 days ago














    • 1





      ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

      – Bauglir42
      2 days ago








    1




    1





    ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

    – Bauglir42
    2 days ago





    ohhh the --lines argument only affects the journal part. I misunderstood the doc in that regard. Allright, that explains it, seems like I have to use head or sed

    – Bauglir42
    2 days ago













    2














    This is what the head command was designed for.



    systemctl --user status resilio-sync | head -n 3





    share|improve this answer










    New contributor




    whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      2














      This is what the head command was designed for.



      systemctl --user status resilio-sync | head -n 3





      share|improve this answer










      New contributor




      whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        2












        2








        2







        This is what the head command was designed for.



        systemctl --user status resilio-sync | head -n 3





        share|improve this answer










        New contributor




        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        This is what the head command was designed for.



        systemctl --user status resilio-sync | head -n 3






        share|improve this answer










        New contributor




        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer








        edited 2 days ago









        GAD3R

        26k1751107




        26k1751107






        New contributor




        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 2 days ago









        whistl034whistl034

        212




        212




        New contributor




        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        whistl034 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            Bauglir42 is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Bauglir42 is a new contributor. Be nice, and check out our Code of Conduct.













            Bauglir42 is a new contributor. Be nice, and check out our Code of Conduct.












            Bauglir42 is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495017%2fsystemctl-status-always-shows-full-log-even-with-lines%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Paul Cézanne

            UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

            Angular material date-picker (MatDatepicker) auto completes the date on focus out