Re: [arch-general] Impossible redirect console buffer to log

2019-03-03 Thread Ralph Corderoy
Hi Maykel,

> > This will remove the carriage returns at the end of lines once
> > script has finished.
>
> This not working. Not quit the end file log character "^M"
>
> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log
> > sed -i 's/\r$//' mylogfile.log

It works here.

$ script -f -c 'seq 3' mylogfile.log
Script started, file is mylogfile.log
1
2
3
Script done, file is mylogfile.log
$ od -c mylogfile.log | fgrep '\r'
140   L   I   N   E   S   =   "   4   0   "   ]  \n   1  \r  \n
160   2  \r  \n   3  \r  \n  \n   S   c   r   i   p   t   d   o
$ sed -i 's/\r$//' mylogfile.log
$ od -c mylogfile.log | fgrep '\r'
$

Does that od(1) pipeline show any carriage returns in mylogfile.log for
you after you have run the sed command?  What you call `^M', od shows as
`\r'.

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-03 Thread Maykel Franco via arch-general
El sáb., 2 mar. 2019 a las 10:23, Ralph Corderoy
() escribió:
>
> Hi Maykel,
>
> > Now only remove ^M character from log files in buffer time but this
> > not working:
> >
> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'
>
> script(1) writes to mylogfile.log, sed sees no input.
> This will remove the carriage returns at the end of lines once script
> has finished.
>

This not working. Not quit the end file log character "^M"

> script -f -c '/usr/local/bin/cccam -d' mylogfile.log
> sed -i 's/\r$//' mylogfile.log


>
> > https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>
> It's an executable, no source, no documentation to suggest what it will
> do, so I'm not going to run it.  :-)

Yes, I know.

>
> --
> Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-02 Thread Ralph Corderoy
Hi Maykel,

> Now only remove ^M character from log files in buffer time but this
> not working:
>
> script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'

script(1) writes to mylogfile.log, sed sees no input.
This will remove the carriage returns at the end of lines once script
has finished.

script -f -c '/usr/local/bin/cccam -d' mylogfile.log
sed -i 's/\r$//' mylogfile.log

> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64

It's an executable, no source, no documentation to suggest what it will
do, so I'm not going to run it.  :-)

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-02 Thread Ralph Corderoy
Hi Maykel,

> > > > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> > > > will capture the write(2)s or similar and you can see what file
> > > > descriptors its writing to and work backwards to see how that
> > > > was obtained, e.g. by opening /dev/tty.
> > >
> > > Nothing happens, it closes and the process does not start
> > >
> > > root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
> > > root@arch:~#

It's not a good idea to run commands suggested on the Internet without
first getting some understanding of what they will do to your system.
That strace(1) command will have created one or more `st.*' files
allowing you to see all the system calls the process and its children
did, including what led to it deciding not to do any output.

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 21:49, Chris Billington
() escribió:
>
> The output of the script command can contain all sorts of control characters 
> and ANSI escape sequences since it is exactly what is being written to the 
> terminal.
>
> Incidentally, I have written a Python function for cleaning up such output 
> (solely used to document my Arch linux installation):
>
> https://bitbucket.org/cbillington/arch_install/src/default/arch_install.py#lines-58
>
> It doesn't just remove the control characters (and ANSI escape sequences), it 
> processes backspace characters and carriage returns etc to result in what you 
> would have seen on your screen. It is not comprehensive but does a pretty 
> good job. So you might want to postprocess your logs with that or similar.
>
> -Chris
>
>
> On Fri, Mar 1, 2019 at 3:41 PM Maykel Franco  wrote:
>>
>> El vie., 1 mar. 2019 a las 21:32, Chris Billington
>> () escribió:
>> >
>> > The 'flush' option could help with that:
>> > [bilbo:~]$ script -h | grep flush
>> >  -f, --flush   run flush after each write
>> >
>> > So, something like
>> >
>> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log
>> >
>> > I would want to get to the bottom of why this binary does not play well 
>> > with normal tools, but if you just need things working, it looks like you 
>> > might have something workable with 'script'.
>> >
>> > -Chris
>> >
>> > On Fri, Mar 1, 2019 at 3:27 PM Maykel Franco  
>> > wrote:
>> >>
>> >> El vie., 1 mar. 2019 a las 20:08, Chris Billington
>> >> () escribió:
>> >> >
>> >> > This is pretty strange.
>> >> >
>> >> > As for the script command, it can be passed the command to run, but I 
>> >> > am guessing it will have the same symptoms as with 'unbuffer':
>> >> >
>> >> > [bilbo:~]$ script -c 'echo hello' mylogfile.log
>> >> > Script started, file is mylogfile.log
>> >> > hello
>> >> > Script done, file is mylogfile.log
>> >> > [bilbo:~]$ cat mylogfile.log
>> >> > Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color" 
>> >> > TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
>> >> > hello
>> >> >
>> >> > Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]
>> >> >
>> >> > On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general 
>> >> >  wrote:
>> >> >>
>> >> >> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
>> >> >> () escribió:
>> >> >> >
>> >> >> > Hi Maykel,
>> >> >> >
>> >> >> > > > command &> out
>> >> >> > >
>> >> >> > > Not works... I probe all combinations:
>> >> >> > >
>> >> >> > > > file redirects stdout to file
>> >> >> > > 1> file redirects stdout to file
>> >> >> > > 2> file redirects stderr to file
>> >> >> > > &> file redirects stdout and stderr to file
>> >> >> >
>> >> >> > Can you show us one complete command with `&>' in case there's 
>> >> >> > something
>> >> >> > else wrong?
>> >> >> >
>> >> >> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
>> >> >> > will capture the write(2)s or similar and you can see what file
>> >> >> > descriptors its writing to and work backwards to see how that was
>> >> >> > obtained, e.g. by opening /dev/tty.
>> >> >> >
>> >> >> > --
>> >> >> > Cheers, Ralph.
>> >> >>
>> >> >> Nothing happens, it closes and the process does not start
>> >> >>
>> >> >> root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
>> >> >> root@arch:~#
>> >> >> root@arch:~#
>> >>
>> >> ok, ask you for command script, ok:
>> >>
>> >> script -c '/usr/local/bin/cccam -d' mylogfile.log
>> >>
>> >> This is works, but only write to file when stop script with ctrl + c
>> >>
>> >>
>> >> ~# cat mylogfile.log
>> >> Script started on Fri Mar  1 21:24:35 2019
>> >> 21:24:35.913 CCcam:
>> >> ==
>> >> 21:24:35.913 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
>> >> 21:24:35.913 CCcam:
>> >> ==
>> >> 21:24:35.913 CCcam: online using nodeId 95ced5a4a066a2b2
>> >> 21:24:35.931 CCcam: create 1 cam device(s)
>> >> 21:24:35.935 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not 
>> >> found
>> >> 21:24:35.936 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or 
>> >> not found
>> >> 21:24:35.936 CCcam: static cw not found or bad
>> >> 21:24:35.943 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
>> >> 21:24:35.943 CCcam: added 1005 provider names from 
>> >> /var/etc/CCcam.providers
>> >> 21:24:36.035 CCcam: added 11097 channel names from 
>> >> /var/etc/CCcam.channelinfo
>> >> 21:24:36.035 CCcam: server started on port 47015
>> >>
>> >>
>> >> The script download from:
>> >>
>> >> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>> >>
>> >> Thanks.
>>
>> wow, it works! Many thanks.
>>
>> Now only remove ^M character from log files in buffer time but this not 
>> working:
>>
>>
>> script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'
>>
>> If you want to try it because it does not work with 

Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
The output of the script command can contain all sorts of control
characters and ANSI escape sequences since it is exactly what is being
written to the terminal.

Incidentally, I have written a Python function for cleaning up such output
(solely used to document my Arch linux installation):

https://bitbucket.org/cbillington/arch_install/src/default/arch_install.py#lines-58

It doesn't just remove the control characters (and ANSI escape sequences),
it processes backspace characters and carriage returns etc to result in
what you would have seen on your screen. It is not comprehensive but does a
pretty good job. So you might want to postprocess your logs with that or
similar.

-Chris


On Fri, Mar 1, 2019 at 3:41 PM Maykel Franco  wrote:

> El vie., 1 mar. 2019 a las 21:32, Chris Billington
> () escribió:
> >
> > The 'flush' option could help with that:
> > [bilbo:~]$ script -h | grep flush
> >  -f, --flush   run flush after each write
> >
> > So, something like
> >
> > script -f -c '/usr/local/bin/cccam -d' mylogfile.log
> >
> > I would want to get to the bottom of why this binary does not play well
> with normal tools, but if you just need things working, it looks like you
> might have something workable with 'script'.
> >
> > -Chris
> >
> > On Fri, Mar 1, 2019 at 3:27 PM Maykel Franco 
> wrote:
> >>
> >> El vie., 1 mar. 2019 a las 20:08, Chris Billington
> >> () escribió:
> >> >
> >> > This is pretty strange.
> >> >
> >> > As for the script command, it can be passed the command to run, but I
> am guessing it will have the same symptoms as with 'unbuffer':
> >> >
> >> > [bilbo:~]$ script -c 'echo hello' mylogfile.log
> >> > Script started, file is mylogfile.log
> >> > hello
> >> > Script done, file is mylogfile.log
> >> > [bilbo:~]$ cat mylogfile.log
> >> > Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color"
> TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
> >> > hello
> >> >
> >> > Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]
> >> >
> >> > On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general <
> arch-general@archlinux.org> wrote:
> >> >>
> >> >> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
> >> >> () escribió:
> >> >> >
> >> >> > Hi Maykel,
> >> >> >
> >> >> > > > command &> out
> >> >> > >
> >> >> > > Not works... I probe all combinations:
> >> >> > >
> >> >> > > > file redirects stdout to file
> >> >> > > 1> file redirects stdout to file
> >> >> > > 2> file redirects stderr to file
> >> >> > > &> file redirects stdout and stderr to file
> >> >> >
> >> >> > Can you show us one complete command with `&>' in case there's
> something
> >> >> > else wrong?
> >> >> >
> >> >> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> >> >> > will capture the write(2)s or similar and you can see what file
> >> >> > descriptors its writing to and work backwards to see how that was
> >> >> > obtained, e.g. by opening /dev/tty.
> >> >> >
> >> >> > --
> >> >> > Cheers, Ralph.
> >> >>
> >> >> Nothing happens, it closes and the process does not start
> >> >>
> >> >> root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
> >> >> root@arch:~#
> >> >> root@arch:~#
> >>
> >> ok, ask you for command script, ok:
> >>
> >> script -c '/usr/local/bin/cccam -d' mylogfile.log
> >>
> >> This is works, but only write to file when stop script with ctrl + c
> >>
> >>
> >> ~# cat mylogfile.log
> >> Script started on Fri Mar  1 21:24:35 2019
> >> 21:24:35.913 CCcam:
> >> ==
> >> 21:24:35.913 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00
> :47:12
> >> 21:24:35.913 CCcam:
> >> ==
> >> 21:24:35.913 CCcam: online using nodeId 95ced5a4a066a2b2
> >> 21:24:35.931 CCcam: create 1 cam device(s)
> >> 21:24:35.935 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or
> not found
> >> 21:24:35.936 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or
> not found
> >> 21:24:35.936 CCcam: static cw not found or bad
> >> 21:24:35.943 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
> >> 21:24:35.943 CCcam: added 1005 provider names from
> /var/etc/CCcam.providers
> >> 21:24:36.035 CCcam: added 11097 channel names from
> /var/etc/CCcam.channelinfo
> >> 21:24:36.035 CCcam: server started on port 47015
> >>
> >>
> >> The script download from:
> >>
> >> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
> >>
> >> Thanks.
>
> wow, it works! Many thanks.
>
> Now only remove ^M character from log files in buffer time but this not
> working:
>
>
> script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'
>
> If you want to try it because it does not work with the normal tools
> you can download it here
>
> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>
> Many thanks again for all.
>


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 21:32, Chris Billington
() escribió:
>
> The 'flush' option could help with that:
> [bilbo:~]$ script -h | grep flush
>  -f, --flush   run flush after each write
>
> So, something like
>
> script -f -c '/usr/local/bin/cccam -d' mylogfile.log
>
> I would want to get to the bottom of why this binary does not play well with 
> normal tools, but if you just need things working, it looks like you might 
> have something workable with 'script'.
>
> -Chris
>
> On Fri, Mar 1, 2019 at 3:27 PM Maykel Franco  wrote:
>>
>> El vie., 1 mar. 2019 a las 20:08, Chris Billington
>> () escribió:
>> >
>> > This is pretty strange.
>> >
>> > As for the script command, it can be passed the command to run, but I am 
>> > guessing it will have the same symptoms as with 'unbuffer':
>> >
>> > [bilbo:~]$ script -c 'echo hello' mylogfile.log
>> > Script started, file is mylogfile.log
>> > hello
>> > Script done, file is mylogfile.log
>> > [bilbo:~]$ cat mylogfile.log
>> > Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color" 
>> > TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
>> > hello
>> >
>> > Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]
>> >
>> > On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general 
>> >  wrote:
>> >>
>> >> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
>> >> () escribió:
>> >> >
>> >> > Hi Maykel,
>> >> >
>> >> > > > command &> out
>> >> > >
>> >> > > Not works... I probe all combinations:
>> >> > >
>> >> > > > file redirects stdout to file
>> >> > > 1> file redirects stdout to file
>> >> > > 2> file redirects stderr to file
>> >> > > &> file redirects stdout and stderr to file
>> >> >
>> >> > Can you show us one complete command with `&>' in case there's something
>> >> > else wrong?
>> >> >
>> >> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
>> >> > will capture the write(2)s or similar and you can see what file
>> >> > descriptors its writing to and work backwards to see how that was
>> >> > obtained, e.g. by opening /dev/tty.
>> >> >
>> >> > --
>> >> > Cheers, Ralph.
>> >>
>> >> Nothing happens, it closes and the process does not start
>> >>
>> >> root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
>> >> root@arch:~#
>> >> root@arch:~#
>>
>> ok, ask you for command script, ok:
>>
>> script -c '/usr/local/bin/cccam -d' mylogfile.log
>>
>> This is works, but only write to file when stop script with ctrl + c
>>
>>
>> ~# cat mylogfile.log
>> Script started on Fri Mar  1 21:24:35 2019
>> 21:24:35.913 CCcam:
>> ==
>> 21:24:35.913 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
>> 21:24:35.913 CCcam:
>> ==
>> 21:24:35.913 CCcam: online using nodeId 95ced5a4a066a2b2
>> 21:24:35.931 CCcam: create 1 cam device(s)
>> 21:24:35.935 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not 
>> found
>> 21:24:35.936 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not 
>> found
>> 21:24:35.936 CCcam: static cw not found or bad
>> 21:24:35.943 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
>> 21:24:35.943 CCcam: added 1005 provider names from /var/etc/CCcam.providers
>> 21:24:36.035 CCcam: added 11097 channel names from /var/etc/CCcam.channelinfo
>> 21:24:36.035 CCcam: server started on port 47015
>>
>>
>> The script download from:
>>
>> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>>
>> Thanks.

wow, it works! Many thanks.

Now only remove ^M character from log files in buffer time but this not working:


script -f -c '/usr/local/bin/cccam -d' mylogfile.log | sed 's/^M//g'

If you want to try it because it does not work with the normal tools
you can download it here

https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64

Many thanks again for all.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
The 'flush' option could help with that:
[bilbo:~]$ script -h | grep flush
 -f, --flush   run flush after each write

So, something like

script -f -c '/usr/local/bin/cccam -d' mylogfile.log

I would want to get to the bottom of why this binary does not play well
with normal tools, but if you just need things working, it looks like you
might have something workable with 'script'.

-Chris

On Fri, Mar 1, 2019 at 3:27 PM Maykel Franco  wrote:

> El vie., 1 mar. 2019 a las 20:08, Chris Billington
> () escribió:
> >
> > This is pretty strange.
> >
> > As for the script command, it can be passed the command to run, but I am
> guessing it will have the same symptoms as with 'unbuffer':
> >
> > [bilbo:~]$ script -c 'echo hello' mylogfile.log
> > Script started, file is mylogfile.log
> > hello
> > Script done, file is mylogfile.log
> > [bilbo:~]$ cat mylogfile.log
> > Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color"
> TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
> > hello
> >
> > Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]
> >
> > On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general <
> arch-general@archlinux.org> wrote:
> >>
> >> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
> >> () escribió:
> >> >
> >> > Hi Maykel,
> >> >
> >> > > > command &> out
> >> > >
> >> > > Not works... I probe all combinations:
> >> > >
> >> > > > file redirects stdout to file
> >> > > 1> file redirects stdout to file
> >> > > 2> file redirects stderr to file
> >> > > &> file redirects stdout and stderr to file
> >> >
> >> > Can you show us one complete command with `&>' in case there's
> something
> >> > else wrong?
> >> >
> >> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> >> > will capture the write(2)s or similar and you can see what file
> >> > descriptors its writing to and work backwards to see how that was
> >> > obtained, e.g. by opening /dev/tty.
> >> >
> >> > --
> >> > Cheers, Ralph.
> >>
> >> Nothing happens, it closes and the process does not start
> >>
> >> root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
> >> root@arch:~#
> >> root@arch:~#
>
> ok, ask you for command script, ok:
>
> script -c '/usr/local/bin/cccam -d' mylogfile.log
>
> This is works, but only write to file when stop script with ctrl + c
>
>
> ~# cat mylogfile.log
> Script started on Fri Mar  1 21:24:35 2019
> 21:24:35.913 CCcam:
> ==
> 21:24:35.913 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
> 21:24:35.913 CCcam:
> ==
> 21:24:35.913 CCcam: online using nodeId 95ced5a4a066a2b2
> 21:24:35.931 CCcam: create 1 cam device(s)
> 21:24:35.935 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not
> found
> 21:24:35.936 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not
> found
> 21:24:35.936 CCcam: static cw not found or bad
> 21:24:35.943 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
> 21:24:35.943 CCcam: added 1005 provider names from /var/etc/CCcam.providers
> 21:24:36.035 CCcam: added 11097 channel names from
> /var/etc/CCcam.channelinfo
> 21:24:36.035 CCcam: server started on port 47015
>
>
> The script download from:
>
> https://github.com/ryanfox1985/docker-cccam/blob/master/CCcam.x86_64
>
> Thanks.
>


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
This is pretty strange.

As for the script command, it can be passed the command to run, but I am
guessing it will have the same symptoms as with 'unbuffer':

[bilbo:~]$ script -c 'echo hello' mylogfile.log
Script started, file is mylogfile.log
hello
Script done, file is mylogfile.log
[bilbo:~]$ cat mylogfile.log
Script started on 2019-03-01 14:05:28-05:00 [TERM="xterm-256color"
TTY="/dev/pts/0" COLUMNS="137" LINES="24"]
hello

Script done on 2019-03-01 14:05:28-05:00 [COMMAND_EXIT_CODE="0"]

On Fri, Mar 1, 2019 at 1:40 PM Maykel Franco via arch-general <
arch-general@archlinux.org> wrote:

> El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
> () escribió:
> >
> > Hi Maykel,
> >
> > > > command &> out
> > >
> > > Not works... I probe all combinations:
> > >
> > > > file redirects stdout to file
> > > 1> file redirects stdout to file
> > > 2> file redirects stderr to file
> > > &> file redirects stdout and stderr to file
> >
> > Can you show us one complete command with `&>' in case there's something
> > else wrong?
> >
> > Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> > will capture the write(2)s or similar and you can see what file
> > descriptors its writing to and work backwards to see how that was
> > obtained, e.g. by opening /dev/tty.
> >
> > --
> > Cheers, Ralph.
>
> Nothing happens, it closes and the process does not start
>
> root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
> root@arch:~#
> root@arch:~#
>


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 19:30, Ralph Corderoy
() escribió:
>
> Hi Maykel,
>
> > > command &> out
> >
> > Not works... I probe all combinations:
> >
> > > file redirects stdout to file
> > 1> file redirects stdout to file
> > 2> file redirects stderr to file
> > &> file redirects stdout and stderr to file
>
> Can you show us one complete command with `&>' in case there's something
> else wrong?
>
> Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
> will capture the write(2)s or similar and you can see what file
> descriptors its writing to and work backwards to see how that was
> obtained, e.g. by opening /dev/tty.
>
> --
> Cheers, Ralph.

Nothing happens, it closes and the process does not start

root@arch:~# LC_ALL=C strace -ff -o st /usr/local/bin/cccam -d
root@arch:~#
root@arch:~#


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Ralph Corderoy
Hi Maykel,

> > command &> out
>
> Not works... I probe all combinations:
>
> > file redirects stdout to file
> 1> file redirects stdout to file
> 2> file redirects stderr to file
> &> file redirects stdout and stderr to file

Can you show us one complete command with `&>' in case there's something
else wrong?

Otherwise, `LC_ALL=C strace -ff -o st /usr/local/bin/CCcam -d'
will capture the write(2)s or similar and you can see what file
descriptors its writing to and work backwards to see how that was
obtained, e.g. by opening /dev/tty.

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 19:15, Chris Billington
() escribió:
>
> Perplexing! How about the 'script' command?
>
> On Fri., 1 Mar. 2019, 13:13 Maykel Franco,  wrote:
>>
>> El vie., 1 mar. 2019 a las 19:09, Chris Billington
>> () escribió:
>> >
>> > The program could also explicitly be modifying its behaviour based on 
>> > whether stdout is a tty or not. You can trick it into thinking its stdout 
>> > is a tty with the program 'unbuffer'. For example:
>> >
>> > [bilbo:~]$ python -c 'import sys; print(sys.stdout.isatty())' | cat
>> > False
>> > [bilbo:~]$ unbuffer python -c 'import sys; print(sys.stdout.isatty())' | 
>> > cat
>> > True
>> >
>> > So you might try:
>> >
>> > unbuffer /usr/local/bin/CCcam -d > file
>> >
>> >
>> > On Fri, Mar 1, 2019 at 1:04 PM Maykel Franco  
>> > wrote:
>> >>
>> >> El vie., 1 mar. 2019 a las 19:01, Chris Billington
>> >> () escribió:
>> >> >
>> >> > Perhaps the program writes its log to stderr, and not to stdout?
>> >> >
>> >> > If so, you can redirect both stdout and stderr to file with:
>> >> >
>> >> > command &> out
>> >> >
>> >> >
>> >> >
>> >> > On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general 
>> >> >  wrote:
>> >> >>
>> >> >> HI, I playing with cccam for a proyect with decoder and I like stdout
>> >> >> console log to specific log but not work...
>> >> >>
>> >> >> I try all:
>> >> >>
>> >> >> >> /var/log/test.log
>> >> >>
>> >> >> tee -a /var/log/test.log
>> >> >>
>> >> >> strace -p pid
>> >> >>
>> >> >> The command is:
>> >> >>
>> >> >> /usr/local/bin/CCcam -d
>> >> >> 18:43:15.717 CCcam:
>> >> >> ==
>> >> >> 18:43:15.717 CCcam: starting CCcam
>> >> >> ==
>> >> >> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
>> >> >> 18:43:15.735 CCcam: create 1 cam device(s)
>> >> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or 
>> >> >> not found
>> >> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or 
>> >> >> not found
>> >> >> 18:43:15.739 CCcam: static cw not found or bad
>> >> >> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
>> >> >> 18:43:15.747 CCcam: added 1005 provider names from 
>> >> >> /var/etc/CCcam.providers
>> >> >> 18:43:15.798 CCcam: added 11097 channel names from 
>> >> >> /var/etc/CCcam.channelinfo
>> >> >> 18:43:15.798 CCcam: server started on port 47015
>> >> >>
>> >> >>
>> >> >>
>> >> >> The binary program is:
>> >> >>
>> >> >> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
>> >> >> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
>> >> >> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
>> >> >> 83d63f30e96e489f29df424b5, stripped
>> >> >>
>> >> >>
>> >> >> I've tried everything, I do not know what to do to have that output
>> >> >> write it to log.
>> >> >>
>> >> >> I've tried inclusy with tty, pts but it's impossible.
>> >> >>
>> >> >> Does somebody knows why it could be? with any other command / program 
>> >> >> works well
>> >> >>
>> >> >> with the only thing that I have managed to write to log is add:
>> >> >>
>> >> >> | stdbuf -oL
>> >> >>
>> >> >> but the program closes
>> >>
>> >> Thanks for your reply.
>> >>
>> >> Not works... I probe all combinations:
>> >>
>> >> > file redirects stdout to file
>> >> 1> file redirects stdout to file
>> >> 2> file redirects stderr to file
>> >> &> file redirects stdout and stderr to file
>> >>
>> >> Not work...
>>
>> Unbuffer work but the program exit...
>>
>> $ unbuffer /usr/local/bin/cccam -d > /var/log/test.log
>>
>> tail: /var/log/test.log: file truncated
>> 19:12:12.548 CCcam:
>> ==
>> 19:12:12.548 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
>> 19:12:12.548 CCcam:
>> ==
>> 19:12:12.548 CCcam: online using nodeId 95ced5a4a066a2b2
>> 19:12:12.568 CCcam: create 1 cam device(s)
>>
>> and exit... crash/close program

The program is a binary:

/usr/local/bin/cccam: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
for GNU/Linux 2.6.15, stripped


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
Perplexing! How about the 'script' command?

On Fri., 1 Mar. 2019, 13:13 Maykel Franco,  wrote:

> El vie., 1 mar. 2019 a las 19:09, Chris Billington
> () escribió:
> >
> > The program could also explicitly be modifying its behaviour based on
> whether stdout is a tty or not. You can trick it into thinking its stdout
> is a tty with the program 'unbuffer'. For example:
> >
> > [bilbo:~]$ python -c 'import sys; print(sys.stdout.isatty())' | cat
> > False
> > [bilbo:~]$ unbuffer python -c 'import sys; print(sys.stdout.isatty())' |
> cat
> > True
> >
> > So you might try:
> >
> > unbuffer /usr/local/bin/CCcam -d > file
> >
> >
> > On Fri, Mar 1, 2019 at 1:04 PM Maykel Franco 
> wrote:
> >>
> >> El vie., 1 mar. 2019 a las 19:01, Chris Billington
> >> () escribió:
> >> >
> >> > Perhaps the program writes its log to stderr, and not to stdout?
> >> >
> >> > If so, you can redirect both stdout and stderr to file with:
> >> >
> >> > command &> out
> >> >
> >> >
> >> >
> >> > On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general <
> arch-general@archlinux.org> wrote:
> >> >>
> >> >> HI, I playing with cccam for a proyect with decoder and I like stdout
> >> >> console log to specific log but not work...
> >> >>
> >> >> I try all:
> >> >>
> >> >> >> /var/log/test.log
> >> >>
> >> >> tee -a /var/log/test.log
> >> >>
> >> >> strace -p pid
> >> >>
> >> >> The command is:
> >> >>
> >> >> /usr/local/bin/CCcam -d
> >> >> 18:43:15.717 CCcam:
> >> >>
> ==
> >> >> 18:43:15.717 CCcam: starting CCcam
> >> >>
> ==
> >> >> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
> >> >> 18:43:15.735 CCcam: create 1 cam device(s)
> >> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key
> or not found
> >> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key
> or not found
> >> >> 18:43:15.739 CCcam: static cw not found or bad
> >> >> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
> >> >> 18:43:15.747 CCcam: added 1005 provider names from
> /var/etc/CCcam.providers
> >> >> 18:43:15.798 CCcam: added 11097 channel names from
> /var/etc/CCcam.channelinfo
> >> >> 18:43:15.798 CCcam: server started on port 47015
> >> >>
> >> >>
> >> >>
> >> >> The binary program is:
> >> >>
> >> >> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
> >> >> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
> >> >> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
> >> >> 83d63f30e96e489f29df424b5, stripped
> >> >>
> >> >>
> >> >> I've tried everything, I do not know what to do to have that output
> >> >> write it to log.
> >> >>
> >> >> I've tried inclusy with tty, pts but it's impossible.
> >> >>
> >> >> Does somebody knows why it could be? with any other command /
> program works well
> >> >>
> >> >> with the only thing that I have managed to write to log is add:
> >> >>
> >> >> | stdbuf -oL
> >> >>
> >> >> but the program closes
> >>
> >> Thanks for your reply.
> >>
> >> Not works... I probe all combinations:
> >>
> >> > file redirects stdout to file
> >> 1> file redirects stdout to file
> >> 2> file redirects stderr to file
> >> &> file redirects stdout and stderr to file
> >>
> >> Not work...
>
> Unbuffer work but the program exit...
>
> $ unbuffer /usr/local/bin/cccam -d > /var/log/test.log
>
> tail: /var/log/test.log: file truncated
> 19:12:12.548 CCcam:
> ==
> 19:12:12.548 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
> 19:12:12.548 CCcam:
> ==
> 19:12:12.548 CCcam: online using nodeId 95ced5a4a066a2b2
> 19:12:12.568 CCcam: create 1 cam device(s)
>
> and exit... crash/close program
>


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 19:09, Chris Billington
() escribió:
>
> The program could also explicitly be modifying its behaviour based on whether 
> stdout is a tty or not. You can trick it into thinking its stdout is a tty 
> with the program 'unbuffer'. For example:
>
> [bilbo:~]$ python -c 'import sys; print(sys.stdout.isatty())' | cat
> False
> [bilbo:~]$ unbuffer python -c 'import sys; print(sys.stdout.isatty())' | cat
> True
>
> So you might try:
>
> unbuffer /usr/local/bin/CCcam -d > file
>
>
> On Fri, Mar 1, 2019 at 1:04 PM Maykel Franco  wrote:
>>
>> El vie., 1 mar. 2019 a las 19:01, Chris Billington
>> () escribió:
>> >
>> > Perhaps the program writes its log to stderr, and not to stdout?
>> >
>> > If so, you can redirect both stdout and stderr to file with:
>> >
>> > command &> out
>> >
>> >
>> >
>> > On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general 
>> >  wrote:
>> >>
>> >> HI, I playing with cccam for a proyect with decoder and I like stdout
>> >> console log to specific log but not work...
>> >>
>> >> I try all:
>> >>
>> >> >> /var/log/test.log
>> >>
>> >> tee -a /var/log/test.log
>> >>
>> >> strace -p pid
>> >>
>> >> The command is:
>> >>
>> >> /usr/local/bin/CCcam -d
>> >> 18:43:15.717 CCcam:
>> >> ==
>> >> 18:43:15.717 CCcam: starting CCcam
>> >> ==
>> >> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
>> >> 18:43:15.735 CCcam: create 1 cam device(s)
>> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not 
>> >> found
>> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or 
>> >> not found
>> >> 18:43:15.739 CCcam: static cw not found or bad
>> >> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
>> >> 18:43:15.747 CCcam: added 1005 provider names from 
>> >> /var/etc/CCcam.providers
>> >> 18:43:15.798 CCcam: added 11097 channel names from 
>> >> /var/etc/CCcam.channelinfo
>> >> 18:43:15.798 CCcam: server started on port 47015
>> >>
>> >>
>> >>
>> >> The binary program is:
>> >>
>> >> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
>> >> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
>> >> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
>> >> 83d63f30e96e489f29df424b5, stripped
>> >>
>> >>
>> >> I've tried everything, I do not know what to do to have that output
>> >> write it to log.
>> >>
>> >> I've tried inclusy with tty, pts but it's impossible.
>> >>
>> >> Does somebody knows why it could be? with any other command / program 
>> >> works well
>> >>
>> >> with the only thing that I have managed to write to log is add:
>> >>
>> >> | stdbuf -oL
>> >>
>> >> but the program closes
>>
>> Thanks for your reply.
>>
>> Not works... I probe all combinations:
>>
>> > file redirects stdout to file
>> 1> file redirects stdout to file
>> 2> file redirects stderr to file
>> &> file redirects stdout and stderr to file
>>
>> Not work...

Unbuffer work but the program exit...

$ unbuffer /usr/local/bin/cccam -d > /var/log/test.log

tail: /var/log/test.log: file truncated
19:12:12.548 CCcam:
==
19:12:12.548 CCcam: starting CCcam 2.1.3 compiled on Nov 14 2009@00:47:12
19:12:12.548 CCcam:
==
19:12:12.548 CCcam: online using nodeId 95ced5a4a066a2b2
19:12:12.568 CCcam: create 1 cam device(s)

and exit... crash/close program


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
The program could also explicitly be modifying its behaviour based on
whether stdout is a tty or not. You can trick it into thinking its stdout
is a tty with the program 'unbuffer'. For example:

[bilbo:~]$ python -c 'import sys; print(sys.stdout.isatty())' | cat
False
[bilbo:~]$ unbuffer python -c 'import sys; print(sys.stdout.isatty())' | cat
True

So you might try:

unbuffer /usr/local/bin/CCcam -d > file


On Fri, Mar 1, 2019 at 1:04 PM Maykel Franco  wrote:

> El vie., 1 mar. 2019 a las 19:01, Chris Billington
> () escribió:
> >
> > Perhaps the program writes its log to stderr, and not to stdout?
> >
> > If so, you can redirect both stdout and stderr to file with:
> >
> > command &> out
> >
> >
> >
> > On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general <
> arch-general@archlinux.org> wrote:
> >>
> >> HI, I playing with cccam for a proyect with decoder and I like stdout
> >> console log to specific log but not work...
> >>
> >> I try all:
> >>
> >> >> /var/log/test.log
> >>
> >> tee -a /var/log/test.log
> >>
> >> strace -p pid
> >>
> >> The command is:
> >>
> >> /usr/local/bin/CCcam -d
> >> 18:43:15.717 CCcam:
> >> ==
> >> 18:43:15.717 CCcam: starting CCcam
> >> ==
> >> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
> >> 18:43:15.735 CCcam: create 1 cam device(s)
> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or
> not found
> >> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or
> not found
> >> 18:43:15.739 CCcam: static cw not found or bad
> >> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
> >> 18:43:15.747 CCcam: added 1005 provider names from
> /var/etc/CCcam.providers
> >> 18:43:15.798 CCcam: added 11097 channel names from
> /var/etc/CCcam.channelinfo
> >> 18:43:15.798 CCcam: server started on port 47015
> >>
> >>
> >>
> >> The binary program is:
> >>
> >> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
> >> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
> >> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
> >> 83d63f30e96e489f29df424b5, stripped
> >>
> >>
> >> I've tried everything, I do not know what to do to have that output
> >> write it to log.
> >>
> >> I've tried inclusy with tty, pts but it's impossible.
> >>
> >> Does somebody knows why it could be? with any other command / program
> works well
> >>
> >> with the only thing that I have managed to write to log is add:
> >>
> >> | stdbuf -oL
> >>
> >> but the program closes
>
> Thanks for your reply.
>
> Not works... I probe all combinations:
>
> > file redirects stdout to file
> 1> file redirects stdout to file
> 2> file redirects stderr to file
> &> file redirects stdout and stderr to file
>
> Not work...
>


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
El vie., 1 mar. 2019 a las 19:01, Chris Billington
() escribió:
>
> Perhaps the program writes its log to stderr, and not to stdout?
>
> If so, you can redirect both stdout and stderr to file with:
>
> command &> out
>
>
>
> On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general 
>  wrote:
>>
>> HI, I playing with cccam for a proyect with decoder and I like stdout
>> console log to specific log but not work...
>>
>> I try all:
>>
>> >> /var/log/test.log
>>
>> tee -a /var/log/test.log
>>
>> strace -p pid
>>
>> The command is:
>>
>> /usr/local/bin/CCcam -d
>> 18:43:15.717 CCcam:
>> ==
>> 18:43:15.717 CCcam: starting CCcam
>> ==
>> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
>> 18:43:15.735 CCcam: create 1 cam device(s)
>> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not 
>> found
>> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not 
>> found
>> 18:43:15.739 CCcam: static cw not found or bad
>> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
>> 18:43:15.747 CCcam: added 1005 provider names from /var/etc/CCcam.providers
>> 18:43:15.798 CCcam: added 11097 channel names from /var/etc/CCcam.channelinfo
>> 18:43:15.798 CCcam: server started on port 47015
>>
>>
>>
>> The binary program is:
>>
>> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
>> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
>> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
>> 83d63f30e96e489f29df424b5, stripped
>>
>>
>> I've tried everything, I do not know what to do to have that output
>> write it to log.
>>
>> I've tried inclusy with tty, pts but it's impossible.
>>
>> Does somebody knows why it could be? with any other command / program works 
>> well
>>
>> with the only thing that I have managed to write to log is add:
>>
>> | stdbuf -oL
>>
>> but the program closes

Thanks for your reply.

Not works... I probe all combinations:

> file redirects stdout to file
1> file redirects stdout to file
2> file redirects stderr to file
&> file redirects stdout and stderr to file

Not work...


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Ralph Corderoy
Hi Maykel,

> I playing with cccam for a proyect with decoder and I like stdout
> console log to specific log but not work...
>
> I try all:
>
> >> /var/log/test.log

Have you seen
https://wiki.archlinux.org/index.php/Command-line_shell#Input_and_output
and the links it provides?

-- 
Cheers, Ralph.


Re: [arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Chris Billington via arch-general
Perhaps the program writes its log to stderr, and not to stdout?

If so, you can redirect both stdout and stderr to file with:

command &> out



On Fri, Mar 1, 2019 at 12:47 PM Maykel Franco via arch-general <
arch-general@archlinux.org> wrote:

> HI, I playing with cccam for a proyect with decoder and I like stdout
> console log to specific log but not work...
>
> I try all:
>
> >> /var/log/test.log
>
> tee -a /var/log/test.log
>
> strace -p pid
>
> The command is:
>
> /usr/local/bin/CCcam -d
> 18:43:15.717 CCcam:
> ==
> 18:43:15.717 CCcam: starting CCcam
> ==
> 18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
> 18:43:15.735 CCcam: create 1 cam device(s)
> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not
> found
> 18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not
> found
> 18:43:15.739 CCcam: static cw not found or bad
> 18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
> 18:43:15.747 CCcam: added 1005 provider names from /var/etc/CCcam.providers
> 18:43:15.798 CCcam: added 11097 channel names from
> /var/etc/CCcam.channelinfo
> 18:43:15.798 CCcam: server started on port 47015
>
>
>
> The binary program is:
>
> /usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
> for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
> 83d63f30e96e489f29df424b5, stripped
>
>
> I've tried everything, I do not know what to do to have that output
> write it to log.
>
> I've tried inclusy with tty, pts but it's impossible.
>
> Does somebody knows why it could be? with any other command / program
> works well
>
> with the only thing that I have managed to write to log is add:
>
> | stdbuf -oL
>
> but the program closes
>


[arch-general] Impossible redirect console buffer to log

2019-03-01 Thread Maykel Franco via arch-general
HI, I playing with cccam for a proyect with decoder and I like stdout
console log to specific log but not work...

I try all:

>> /var/log/test.log

tee -a /var/log/test.log

strace -p pid

The command is:

/usr/local/bin/CCcam -d
18:43:15.717 CCcam:
==
18:43:15.717 CCcam: starting CCcam
==
18:43:15.717 CCcam: online using nodeId 91dd747775a31f66
18:43:15.735 CCcam: create 1 cam device(s)
18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not found
18:43:15.739 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not found
18:43:15.739 CCcam: static cw not found or bad
18:43:15.746 CCcam: parsed 11522 entries from /var/etc/CCcam.prio
18:43:15.747 CCcam: added 1005 provider names from /var/etc/CCcam.providers
18:43:15.798 CCcam: added 11097 channel names from /var/etc/CCcam.channelinfo
18:43:15.798 CCcam: server started on port 47015



The binary program is:

/usr/local/bin/CCcam: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
for GNU/Linux 2.6.32, BuildID[sha1]=6ab44025c0a35a3
83d63f30e96e489f29df424b5, stripped


I've tried everything, I do not know what to do to have that output
write it to log.

I've tried inclusy with tty, pts but it's impossible.

Does somebody knows why it could be? with any other command / program works well

with the only thing that I have managed to write to log is add:

| stdbuf -oL

but the program closes