09-03-2018
Write file over network
Hello Forum,
I have an embedded Busybox system with ash shell. On this system is a service with logging output. I want to have this logfile on another computer. This service creates the log file, but I can specify the filename via parameter. The memory is very fast filled up. What could be the easiest way to transfer this file on the fly to another linux machine? I cant install much additional software. I want to run the service for hours, without starting&stopping the service when the space is used.
I thought something like starting the service and writing the log into the file, but transferring the data with netcat to another machine. Where a second netcat instance writes it to hd. If I specify - as filename (for writing the log to stdout), the service only creates a file called --01.log in the current directory. I only need a hint that directs me into the correct direction.
Thanks a lot
Peter
Last edited by peterfarge; 09-03-2018 at 06:03 PM..
10 More Discussions You Might Find Interesting
1. Cybersecurity
Hello,
i need some help/advice on how to solve a particular problem.
these are the users:
|name | group |
---------- ---------------
|boss | department1 |
|assistant | department1 |
|employee | department1 |
|spy | department2 |
this is the... (0 Replies)
Discussion started by: elzalem
0 Replies
2. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
3. Programming
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know... (2 Replies)
Discussion started by: alex_5161
2 Replies
4. Shell Programming and Scripting
Hi All,
I am having an XML tag like:
<detail sim_ser_no_1="898407109001000090"
imsi_1="452070001000090">
<security>ADM1=????</security>
<security>PIN1=????</security>
<security>PIN2=????</security>
... (2 Replies)
Discussion started by: ss_ss
2 Replies
5. OS X (Apple)
On our home network, with 2 Macbook pros running OS X 10.6.*, I would like be able to popup a message to the user of the other computer.
Is there a way I can "call" from one computer to another not using skype, or ichat or any application that the user has to have running?
I guess first I... (8 Replies)
Discussion started by: allelopath
8 Replies
6. Shell Programming and Scripting
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies
7. Shell Programming and Scripting
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies
8. Shell Programming and Scripting
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies
9. Shell Programming and Scripting
Hi Everyone,
I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet.
Example input:
IpAdress:InstanceName:Port:ServerName
10.255.255.1:abc:2232:xyz_abc
Output should be an excel sheet like below:
Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies
10. Shell Programming and Scripting
Hello Team-
we would like to implement an approach which has to write the log file simultaneously
when .sql file is executing by Unix process. At present,it is writing the log file
once the process is completed. I've tested the current process with the below
approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies
LEARN ABOUT CENTOS
systemd-journald.socket
SYSTEMD-JOURNALD.SERVICE(8) systemd-journald.service SYSTEMD-JOURNALD.SERVICE(8)
NAME
systemd-journald.service, systemd-journald.socket, systemd-journald - Journal service
SYNOPSIS
systemd-journald.service
systemd-journald.socket
/usr/lib/systemd/systemd-journald
DESCRIPTION
systemd-journald is a system service that collects and stores logging data. It creates and maintains structured, indexed journals based on
logging information that is received from the kernel, from user processes via the libc syslog(3) call, from STDOUT/STDERR of system
services or via its native API. It will implicitly collect numerous meta data fields for each log messages in a secure and unfakeable way.
See systemd.journal-fields(7) for more information about the collected meta data.
Log data collected by the journal is primarily text-based but can also include binary data where necessary. All objects stored in the
journal can be up to 2^64-1 bytes in size.
By default, the journal stores log data in /run/log/journal/. Since /run/ is volatile, log data is lost at reboot. To make the data
persistent, it is sufficient to create /var/log/journal/ where systemd-journald will then store the data.
systemd-journald will forward all received log messages to the AF_UNIXSOCK_DGRAM socket /run/systemd/journal/syslog, if it exists, which
may be used by Unix syslog daemons to process the data further.
See journald.conf(5) for information about the configuration of this service.
SIGNALS
SIGUSR1
Request that journal data from /run/ is flushed to /var/ in order to make it persistent (if this is enabled). This must be used after
/var/ is mounted, as otherwise log data from /run is never flushed to /var regardless of the configuration.
SIGUSR2
Request immediate rotation of the journal files.
KERNEL COMMAND LINE
A few configuration parameters from journald.conf may be overridden on the kernel command line:
systemd.journald.forward_to_syslog=, systemd.journald.forward_to_kmsg=, systemd.journald.forward_to_console=
Enables/disables forwarding of collected log messages to syslog, the kernel log buffer or the system console.
See journald.conf(5) for information about these settings.
ACCESS CONTROL
Journal files are, by default, owned and readable by the "systemd-journal" system group but are not writable. Adding a user to this group
thus enables her/him to read the journal files.
By default, each logged in user will get her/his own set of journal files in /var/log/journal/. These files will not be owned by the user,
however, in order to avoid that the user can write to them directly. Instead, file system ACLs are used to ensure the user gets read access
only.
Additional users and groups may be granted access to journal files via file system access control lists (ACL). Distributions and
administrators may choose to grant read access to all members of the "wheel" and "adm" system groups with a command such as the following:
# setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/
Note that this command will update the ACLs both for existing journal files and for future journal files created in the /var/log/journal/
directory.
FILES
/etc/systemd/journald.conf
Configure systemd-journald behaviour. See journald.conf(5).
/run/log/journal/machine-id/*.journal, /run/log/journal/machine-id/*.journal~, /var/log/journal/machine-id/*.journal,
/var/log/journal/machine-id/*.journal~
systemd-journald writes entries to files in /run/log/journal/machine-id/ or /var/log/journal/machine-id/ with the ".journal" suffix. If
the daemon is stopped uncleanly, or if the files are found to be corrupted, they are renamed using the ".journal~" suffix, and
systemd-journald starts writing to a new file. /run is used when /var/log/journal is not available, or when Storage=volatile is set in
the journald.conf(5) configuration file.
SEE ALSO
systemd(1), journalctl(1), journald.conf(5), systemd.journal-fields(7), sd-journal(3), setfacl(1), pydoc systemd.journal.
systemd 208 SYSTEMD-JOURNALD.SERVICE(8)