Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
74012838
Commit
74012838
authored
Nov 22, 2017
by
Anastasia Karachaliou
Browse files
rpm cta-rmcd running and having logs printed in /var/log/cta/cta-rmcd.log
parent
a8297627
Changes
7
Hide whitespace changes
Inline
Side-by-side
continuousintegration/docker/ctafrontend/cc7/opt/run/bin/rmcd.sh
View file @
74012838
...
...
@@ -18,7 +18,7 @@ cat /tmp/library-rc.sh
.
/tmp/library-rc.sh
# to get rmcd logs to stdout
tail
-F
/var/log/c
astor/rmcd_legacy
.log &
tail
-F
/var/log/c
ta/cta-rmcd
.log &
ln
-s
/dev/
${
LIBRARYDEVICE
}
/dev/smc
/usr/bin/rmcd
-f
/dev/smc
continuousintegration/orchestration/tests/client_ar.sh
View file @
74012838
...
...
@@ -72,7 +72,7 @@ EOS_BATCHFILE=$(mktemp --suffix=.eosh)
dd
if
=
/dev/urandom
of
=
/tmp/testfile
bs
=
1k
count
=
${
FILE_KB_SIZE
}
||
exit
1
if
[[
$VERBOSE
==
1
]]
;
then
tail
-v
-f
/mnt/logs/tpsrv0
*
/rmcd/c
astor/rmcd_legacy
.log &
tail
-v
-f
/mnt/logs/tpsrv0
*
/rmcd/c
ta/cta-rmcd
.log &
TAILPID
=
$!
fi
...
...
cta.spec.in
View file @
74012838
...
...
@@ -295,6 +295,7 @@ Utilities to faciliate working with the mediachangers
Summary: Tools to faciliate working with rmcd and smc in cta
Group: Application/CTA
Requires: logrotate
#Requires: cta-lib
Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/useradd
%description -n cta-rmcd
CERN Tape Archive:
...
...
@@ -303,16 +304,17 @@ Tools to faciliate working with rmcd and smc in cta
/usr/bin/getent group cta || /usr/sbin/groupadd cta
/usr/bin/getent passwd cta || /usr/sbin/useradd -s /bin/nologin -c "CTA system account" -g cta cta
%files -n cta-rmcd
%attr(0755,root,root) %{_bindir}/cta-rmcd
#%attr(0755,root,root) %{_bindir}/cta-rmcd
%attr(0755,root,root) %{_bindir}/smc
%defattr(-,root,root)
%attr(0755,cta,cta) %dir /var/log/cta
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-rmcd
%attr(0644,root,root) %doc /usr/share/man/man1/cta-rmcd.1cta.gz
%attr(0644,root,root) %doc /usr/share/man/man1/smc.1cta.gz
%attr(0755,root,root) %{_bindir}/cta-rmcd
%attr(0755,root,root) %{_bindir}/smc
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-rmcd.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-smc.conf.example
%attr(0644,root,root) %doc /usr/share/man/man1/smc.1cta.gz
%attr(0644,root,root) /etc/sysconfig/cta-rmcd
%attr(0644,root,root) %config(noreplace) /etc/logrotate.d/cta-rmcd
%attr(0644,root,root) /etc/systemd/system/cta-rmcd.service
%endif
mediachanger/castorrmc/rmc/CMakeLists.txt
View file @
74012838
...
...
@@ -29,12 +29,10 @@ set (RMCD_SRC_FILES
)
add_executable
(
cta-rmcd
${
RMCD_SRC_FILES
}
)
target_link_libraries
(
cta-rmcd ctarmccommon
)
#install (FILES cta-rmcd.conf.example DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
install
(
FILES cta-rmcd.conf DESTINATION
${
CMAKE_INSTALL_SYSCONFDIR
}
/cta
)
install
(
FILES cta-smc.conf.example DESTINATION
${
CMAKE_INSTALL_SYSCONFDIR
}
/cta
)
install
(
TARGETS cta-rmcd DESTINATION /usr/bin
)
#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cta-rmcd.1cta DESTINATION /usr/share/man/man1)
install
(
FILES cta-rmcd.1cta DESTINATION /usr/share/man/man1
)
install
(
FILES cta-rmcd.logrotate DESTINATION /etc/logrotate.d RENAME cta-rmcd
)
install
(
FILES cta-rmcd.sysconfig DESTINATION /etc/sysconfig RENAME cta-rmcd
)
...
...
mediachanger/castorrmc/rmc/cta-rmcd.1cta
View file @
74012838
...
...
@@ -84,7 +84,7 @@ itself.
The completion code of the command is also logged.
.SH FILES
.TP 1.5i
.B /var/log/c
astor/
rmcd.log
.B /var/log/c
ta/cta-
rmcd.log
.SH EXAMPLES
.TP
Here is a small log:
...
...
mediachanger/castorrmc/rmc/cta-rmcd.logrotate
View file @
74012838
/var/log/cta/cta-rmc*.log {
/var/log/cta/cta-rmc
d
*.log {
compress
daily
missingok
...
...
mediachanger/castorrmc/rmc/rmc_logit.c
View file @
74012838
...
...
@@ -32,7 +32,7 @@ int rmc_logit(const char *const func, const char *const msg, ...)
tm
->
tm_mday
,
tm
->
tm_hour
,
tm
->
tm_min
,
tm
->
tm_sec
,
jid
,
func
);
vsprintf
(
prtbuf
+
strlen
(
prtbuf
),
msg
,
args
);
va_end
(
args
);
fd_log
=
open
(
"/var/log/c
astor/rmcd_legacy
.log"
,
O_WRONLY
|
O_CREAT
|
O_APPEND
,
0664
);
fd_log
=
open
(
"/var/log/c
ta/cta-rmcd
.log"
,
O_WRONLY
|
O_CREAT
|
O_APPEND
,
0664
);
if
(
fd_log
<
0
)
return
-
1
;
write
(
fd_log
,
prtbuf
,
strlen
(
prtbuf
));
close
(
fd_log
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment