the location of the file for DSpace - file

Tell me which file contains the non-exclusive license from the dspace developers (note: place your own license here
This sample license is provided for informational purposes only.
NON-EXCLUSIVE DISTRIBUTION LICENSE...)

Saying "please" would have been nice.
This is the file https://github.com/DSpace/DSpace/blob/master/dspace/config/default.license

We're happy to help, but for something like this you could save yourself some waiting. 'grep' is your friend:
mhwood#toolshed ~/dspaces/DS-3879 $ grep "This sample license" . -r
./config/default.license:This sample license is provided for informational purposes only.
mhwood#toolshed ~/dspaces/DS-3879 $

Related

Question of Vendor ID in RFC2408 (ISAKMP)

I am reading the RFC2408(https://www.rfc-editor.org/rfc/rfc2408). I have a question about "Vendor ID section" at page 43(https://www.rfc-editor.org/rfc/rfc2408#page-43).
The document says,
For instance:
"Example Company IPsec. Version 97.1"
(not including the quotes) has MD5 hash:
48544f9b1fe662af98b9b39e50c01a5a, when using MD5file.
But I use many md5 tools like 'md5sum' command or online tools, that they all got result "3245b3577c9e4f751675322f259ff016".
I tried the command on Linux:
echo -n "Example Company IPsec. Version 97.1" | md5sum
3245b3577c9e4f751675322f259ff016 -
I got different result, I believe the RFC ducument would not be wrong, So I wonder where am I wrong, or do I miss some thing?
The MD5 hash is actually of the value:
Example Company IPsec. Version 97.1\n
That is, only one space separates IPsec. and Version and there is a newline character at the end.
So you get this with:
echo "Example Company IPsec. Version 97.1" | md5sum
48544f9b1fe662af98b9b39e50c01a5a -
Please note two things:
While th vendor ID values must be unique, they are otherwise completely arbitrary. This is just an example of how one might be generated. So its correctness is not really relevant.
ISAKMP/IKEv1 has been obsolete for years, please refer to IKEv2 instead (RFC 7296).

Fail to startup Oracle Database (failure in processing system parameters)

I'm going to setup Oracle DB 12c on Ubuntu 16.04. I'm following this guide.
But when I was trying to STARTUP, it's fail with this error:
SQL> connect sys as sysdba
Enter password:
Connected to an idle instance.
SQL> STARTUP;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/12.2.0/dbhome_1/dbs/initSID.ora'
SQL>
How can I resolve this?
[Update]
I have resolved this by this way:
cp init.ora ./initSID.ora
Then it STARUP as well. But I still can not access to https://127.0.0.1:5500/em
I updated env as request from #vs_coder:
LC_PAPER=vi_VN
XDG_VTNR=7
ORBIT_SOCKETDIR=/tmp/orbit-huynq
XDG_SESSION_ID=c2
LC_ADDRESS=vi_VN
CLUTTER_IM_MODULE=xim
LC_MONETARY=vi_VN
TERMINATOR_UUID=######################
IBUS_DISABLE_SNOOPER=1
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/huynq
GIO_LAUNCHED_DESKTOP_FILE_PID=4970
SESSION=ubuntu
GPG_AGENT_INFO=/home/huynq/.gnupg/S.gpg-agent:0:1
TERM=xterm
SHELL=/bin/bash
XDG_MENU_PREFIX=gnome-
ORACLE_UNQNAME=DB12C
TMPDIR=/tmp
DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
LC_NUMERIC=vi_VN
WINDOWID=75497476
OLDPWD=/u01/app/oracle/product/12.2.0/dbhome_1
GNOME_KEYRING_CONTROL=
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1478
GTK_MODULES=gail:atk-bridge:unity-gtk-module
USER=oracle
http_proxy=#######################
LD_LIBRARY_PATH=/u01/app/oracle/product/12.2.0/dbhome_1/lib:/lib:/usr/lib:/usr/lib64
QT_ACCESSIBILITY=1
LC_TELEPHONE=vi_VN
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
ORACLE_SID=SID
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
UNITY_HAS_3D_SUPPORT=false
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=127.0.0.1
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
ftp_proxy=#######################
SESSION_MANAGER=local/huynq-VirtualBox:#/tmp/.ICE-unix/2277,unix/huynq-VirtualBox:/tmp/.ICE-unix/2277
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/terminator.desktop
UNITY_DEFAULT_PROFILE=unity-lowgfx
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
MAIL=/var/mail/oracle
PATH=/u01/app/oracle/product/12.2.0/dbhome_1/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION=ubuntu
QT_QPA_PLATFORMTHEME=appmenu-qt5
QT_IM_MODULE=ibus
LC_IDENTIFICATION=vi_VN
JOB=unity-settings-daemon
PWD=/u01/app/oracle/product/12.2.0/dbhome_1/bin
XDG_SESSION_TYPE=x11
JAVA_HOME=/usr/bin/java
XMODIFIERS=#im=ibus
socks_proxy=#######################
SID=ORCL
LANG=en_US.UTF-8
GNOME_KEYRING_PID=
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
GDM_LANG=en_US
LC_MEASUREMENT=vi_VN
IM_CONFIG_PHASE=1
COMPIZ_CONFIG_PROFILE=ubuntu
GDMSESSION=ubuntu
https_proxy=#######################
GTK2_MODULES=overlay-scrollbar
SESSIONTYPE=gnome-session
XDG_SEAT=seat0
HOME=/home/oracle
SHLVL=2
LANGUAGE=en_US
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LIBGL_ALWAYS_SOFTWARE=1
UPSTART_INSTANCE=
TMP=/tmp
LOGNAME=oracle
XDG_SESSION_DESKTOP=ubuntu
UPSTART_EVENTS=xsession started
COMPIZ_BIN_PATH=/usr/bin/
CLASSPATH=/u01/app/oracle/product/12.2.0/dbhome_1/jlib:/u01/app/oracle/product/12.2.0/dbhome_1/rdbms/jlib
QT4_IM_MODULE=xim
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
J2SDKDIR=/usr/lib/jvm/java-8-oracle
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-5aFOIz1iEI
LESSOPEN=| /usr/bin/lesspipe %s
UPSTART_JOB=unity7
INSTANCE=
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
XDG_CURRENT_DESKTOP=Unity
J2REDIR=/usr/lib/jvm/java-8-oracle/jre
GTK_IM_MODULE=ibus
LC_TIME=vi_VN
LESSCLOSE=/usr/bin/lesspipe %s %s
COLORTERM=gnome-terminal
XAUTHORITY=/home/huynq/.Xauthority
LC_NAME=vi_VN
_=/usr/bin/env`
There are two types of startup parameter files for Oracle Database
pfile(also called init.ora file which's of type text ) and
spfile( which's of type binary ). Prior to version 9i, there was
only pfile, but still might be preferred but the preference is
mainly for backward compatibility with the older releases.
If startup is performed with a pfile as in your case, you need to include the file and path to file :
SQL> startup pfile=/u01/app/oracle/product/12.2.0/dbhome_1/dbs/initSID.ora
or you can create a spfile firstly by
SQL> create spfile from pfile='/u01/app/oracle/product/12.2.0/dbhome_1/dbs/initSID.ora'
and then startup
SQL> startup
without specifying any file.
For enterprise manager, you need to check
$ emctl status dbconsole and see what it tells,
and check whether ORACLE_SID parameter is set.
Looks like you need to set the environment variable ORACLE_SID to ORCL. Assuming you're in linux run this at the command line 'env', without the quotes, and update your original question with the output from that. When Oracle starts it looks for a number of environment variables, ORACLE_HOME and ORACLE_SID are 2 of the critical ones. By posting the output of the env command someone might be able to help.
Also, as a side note, I usually have better luck installing the Oracle database software first, and then creating a database using either the DBCA or the create database command. The latter is a little more advanced but is a good thing to learn.

What is the difference between kobject, device_create and my code?

I am currently reading a book entitled "Linux device drivers" from O'Reilly.
Thing is that this book imo isn't really a guide on how to write drivers but it instead explains all the apis and their prinicples.
So I tried writing a small driver -which doesn't do anything interesting -with what I read so far.
Thing is:
I don't know which file I can execute cat on or echo to in order to invoke my callback functions
it looks nothing like all the other code snippets I found online
The different pieces of code:
my code (https://paste.ubuntu.com/p/8tVyTJTPBQ/)
creates:
$ls /sys/module/main/
oresize holders initsize initstate notes refcnt sections srcversion taint uevent
no new entry in /dev
code snippet using device_create: https://paste.ubuntu.com/p/cJxjdyXjhX/ source
creates:
$ ls /sys/module/main/
coresize holders initsize initstate notes refcnt sections srcversion taint uevent
$ ls -l /dev/ebbchar
crw------- 1 root root 238, 0 Mai 28 07:52 /dev/ebbchar
code using kobjects: https://paste.ubuntu.com/p/nt3XvZs7vF/ source
creates:
$ls -l /sys/kernel/
drwxr-xr-x 2 root root 0 Dec 17 16:29 etx_sysfs
I can see that my code successfully created a bunch of files under /sys/kernel. Now what is the difference in endgoal between my code and the two other snippets? Should I use device_create/kobjects or maybe none of those? The book I am reading doesn't mention anywhere the functions used by the 2 other pieces of code. So not sure which way I am supposed to follow...
Thanks_xe
device_create() creates a device and registers it with sysfs, and create necessary kobjects.
To create necessary kobjects, kobject-related functions(kobject_init(), kobject_add(), ...) are called in device_create().
If you need to create a device, you should call one of device creation functions like device_create().
Answering your question of how to keep up with latest api- Most api if renamed or updated retain similar name and reside mostly in the same header file so a quick grep on the source or easier is http://elixir.bootlin.com/ and search the source doc for a particular function in the Linux release you are working on. if you cant find the API in that release then go through the header to find the new API as the name will almost be the same for example when you will read the Timer chapter , you will find that setup_timer() has been changed to timer_setup(). and few other changes here and there.
If you feel like you can keep up with the latest discussion by subscribing to the kernel maillist or reading the documentation.

Incorrect lmstat stats while using flexlm's lmstat utility

I have been using flexlm's lmstat utility to get the license statistics on every 5min basis and so far i have observed that incorrect lmstat numbers on installed license counts and reservation counts as well! and such events occurs very intermittently :( we tried to upgrading lmstat and other stuffs like vendor daemons and so on! but nothing really helping
Can any one had this similar situation and good solution ?
It's hard to give you a response like 'you must do that' because there is no technical informations.
I try to propose you some ideas.
The lmutil lmstat command give a standard information. The problem is that the interpretation of the result is depending of the editor's license file, not from Flexnet.
For Matlab, you can have Name Networked User (NNU) and Concurent (CN) licenses. For the NNU, you have a login attached a each token. For CN, 'first arrived, first served'. If on the same server you have 10 NNU tokens and 10 CN token, lmstat -c <port#server> -a will report 30 tokens available.
It's only due to Mathworks. When you have 1 NNU token, you can use Matlab from 2 different hosts. So 10 NNU give 2 * 10 = 20 tokens, with the 10 CN tokens, it seems that you have 30 tokens. Very confusing for the users.
When you make a reservation, you consume the token when the license service start even if no one use the token. The number of available tokens is reduced.
[Update]
About of the version of 'lmgrd/lmutil', each vendor define a version to use, but often you can use a higher version.
I've checked Cadence, Comsol and other license services. The counts are good.
You must verify the counts for the lines like :
Users of <an increment>: (Total of 5 licenses issued; Total of 4 licenses in use)
After, you have the used token ('reserved' token are seen like 'used') :
1 RESERVATIONs for GROUP Better_Group (server/2700)
jason abc057 abc057 (v2015.0623) (shoe/28512 3886), start Fri 11/20 14:41
simon abc057 abc057 (v2014.1110) (shoe/28512 4166), start Fri 11/20 15:37, 2 licenses
When you manually check the count and if it is good, your license server is good. In the example : 2 real users but 3 tokens + 1 reservation = 4 token used. Be careful in your parsing, don't miss the , 2 licenses, I have a Awk script that miss that.
You must check in the same time the status of your license server, the logfile and the user's actions. To check the status, you can use :
lmutil lmstat -c <port>#<server> -a
When and how long a token is used is an software's property :
a token can be taken (OUT) when the software start and released (IN) when the software is stopped;
a token can be taken (OUT) only when a feature is called and released when the feature has finish his work;
a token can be taken (OUT) and released (IN) immediately to check if the software or the feature could be used.
So, if you check your licenses every fives minutes, many 'OUT' and 'IN' actions could be missing. But it's not a problem lmutil lmstat give only informations on the licenses at a specific instant.
If you want follow all usages, you must work with the logfiles like PHPlicensewatcher : http://phplicensewatch.sourceforge.net/. The tool make a 'scp' in a crontab to get the logfile on the licenses server.
Depending of the daemon vendor, when you update the license file, you could make a lmutil lmreread -c <file>, but some (like Matlab) don't accept this and you must make a restart. This could introduce a difference between the number of increments/tokens on the server and the resources available seen by a lmstat lmstatus -c <port#server> -i.

Where does linux store my syslog?

I wrote a simple test application to log something in a log file. I am using linux mint and after the application executes I try to view the log using this command:
tail -n 100 /var/log/messages
but the file messages does not exist neither tested or something. Below you can find my code. Maybe I am doing something wrong, the file isn't stored there or I need to enable logging in linux mint.
#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
void init_log()
{
setlogmask(LOG_UPTO(LOG_NOTICE));
openlog("testd",LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
}
int main(void) {
init_log();
printf("Session started!");
syslog(LOG_NOTICE, "Session started!!");
closelog();
return EXIT_SUCCESS;
}
On my Ubuntu machine, I can see the output at /var/log/syslog.
On a RHEL/CentOS machine, the output is found in /var/log/messages.
This is controlled by the rsyslog service, so if this is disabled for some reason you may need to start it with systemctl start rsyslog.
As noted by others, your syslog() output would be logged by the /var/log/syslog file.
You can see system, user, and other logs at /var/log.
For more details: here's an interesting link.
Default log location (rhel) are
General messages:
/var/log/messages
Authentication messages:
/var/log/secure
Mail events:
/var/log/maillog
Check your /etc/syslog.conf or /etc/syslog-ng.conf (it depends on which of syslog facility you have installed)
Example:
$ cat /etc/syslog.conf
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
#For a start, use this simplified approach.
*.* /var/log/messages
In addition to the accepted answer, it is useful to know the following ...
Each of those functions should have manual pages associated with them.
If you run man -k syslog (a keyword search of man pages) you will get a list of man pages that refer to, or are about syslog
$ man -k syslog
logger (1) - a shell command interface to the syslog(3) system l...
rsyslog.conf (5) - rsyslogd(8) configuration file
rsyslogd (8) - reliable and extended syslogd
syslog (2) - read and/or clear kernel message ring buffer; set c...
syslog (3) - send messages to the system logger
vsyslog (3) - send messages to the system logger
You need to understand the manual sections in order to delve further.
Here's an excerpt from the man page for man, that explains man page sections :
The table below shows the section numbers of the manual followed by
the types of pages they contain.
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and convenā€
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
To read the above run
$man man
So, if you run man 3 syslog you get a full manual page for the syslog function that you called in your code.
SYSLOG(3) Linux Programmer's Manual SYSLOG(3)
NAME
closelog, openlog, syslog, vsyslog - send messages to the system
logger
SYNOPSIS
#include <syslog.h>
void openlog(const char *ident, int option, int facility);
void syslog(int priority, const char *format, ...);
void closelog(void);
#include <stdarg.h>
void vsyslog(int priority, const char *format, va_list ap);
Not a direct answer but hopefully you will find this useful.
You have to tell the system what information to log and where to put the info. Logging is configured in the /etc/rsyslog.conf file, then restart rsyslog to load the new config. The default logging rules are usually in a /etc/rsyslog.d/50-default.conf file.
syslog() generates a log message, which will be distributed by syslogd.
The file to configure syslogd is /etc/syslog.conf.
This file will tell your where the messages are logged.
How to change options in this file ?
Here you go
http://www.bo.infn.it/alice/alice-doc/mll-doc/duix/admgde/node74.html
Logging is very configurable in Linux, and you might want to look into your /etc/syslog.conf (or perhaps under /etc/rsyslog.d/). Details depend upon the logging subsystem, and the distribution.
Look also into files under /var/log/ (and perhaps run dmesg for kernel logs).
I'm running Ubuntu under WSL(Windows Subsystem for Linux) and systemctl start rsyslog didn't work for me.
So what I did is this:
$ service rsyslog start
Now syslog file will appear at /var/log/

Resources