# Process ontologies

### Ontologies processing code

> <https://github.com/ontoportal-lirmm/ontologies_linked_data/blob/master/lib/ontologies_linked_data/services/submission_process/submission_processor.rb>


### Ontologies upload / processing steps.

 ![](https://wiki.agroportal.eu/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MyODRmYzA0LTA4ZmUtNGE1Yi05ODM4LWM5MjhmYTFlNjhjNi8zNTllMzZmYi02OTcxLTQxZDctOTUwMi03YmRkYTUyYzhlZDUvaW1hZ2UucG5nIiwidHlwZSI6ImF0dGFjaG1lbnQiLCJpYXQiOjE3OTM4OTQ0MDAsImV4cCI6MTc5Mzk4MDgwMH0.--0WvjMIm5TpSXah0CAXTu8O6cccCeaACDCEqjpkPAk " =3486x1338")


### Command to process an ontology

Up-to-date guide with all options: [Process an ontology](/doc/process-an-ontology-aRWe9qkr1R)

> bin/ncbo_ontology_process -o `ontology-acronym`

(To be done in this path: `/srv/ontoportal/ncbo_cron`)


### Command to copy a file from the server to local

> scp -r -p username@[agroportal.lirmm.fr](mailto:sbouazzouni@agroportal.lirmm.fr):/srv/ontoportal/data/repository/ontology_acronym .


  

### Script to archive old submissions for all ontologies

> bin/ncbo_ontology_archive_old_submissions

(To be done in this path: `/srv/ontoportal/ncbo_cron`)


  

# Commands that may help

`bin/ncbo_cron --console` Run NCBO Cron console  (To be done in this path: `/srv/ontoportal/ncbo_cron`)

  
`sudo opstatus` To see the status of all services (running/stoped)

  
`sudo oprestart` To restart all services

  
`sudo systemctl restart 4s-httpd` To restart a particular service


  

### Issues that you may face

**Unable to launch httpd service**

 ![](https://wiki.agroportal.eu/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzL2MyODRmYzA0LTA4ZmUtNGE1Yi05ODM4LWM5MjhmYTFlNjhjNi85NDUzNTBkOC02NzcyLTRmMTEtODc5MS04NDFiNzZkMGIzYmQvaW1hZ2UucG5nIiwidHlwZSI6ImF0dGFjaG1lbnQiLCJpYXQiOjE3OTM4OTQ0MDAsImV4cCI6MTc5Mzk4MDgwMH0.BrPMQX6kMkqtPpBHD-u1NrNEcbTvZzAAtX3AZ_VLYzA " =2998x734")

This issue might be related to the semaphore limit being reached. To confirm, you can use the following command: `ipcs -s`

  
To clean up all the semaphores used by apache for example you can run this command:

`sudo bash -c 'for semid in $(ipcs -s | grep apache | awk "{print $2}"); do ipcrm -s $semid; done'`

---

**Documents**

- [💁‍♂️ Acknowledgments](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/acknowledgments-15GdRXLQdm)
- [📚Publications and references](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/publications-and-references-87tEoeoGKy)
- [🗽Terms & Conditions](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/terms-conditions-naDsDo2Zxq)
- [🧞‍♂️Metadata guidelines and recommendations](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/metadata-guidelines-and-recommendations-pOFbK9sIfp)
- [📜 AgroPortal Release Notes](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/agroportal-release-notes-btKjZk5tU2)
- [ 👩‍🚀 User Guide](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/user-guide-ZszoBwfjGF)
- [📎 API Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/api-documentation-kMCurGKD97)
- [🤖 Developer Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/developer-documentation-LhsrucqGTa)
- [🗃External Documentation](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/external-documentation-vNPQCdArrr)
- [AgroPortal infrastructure](https://wiki.agroportal.eu/s/e6158eda-c109-4385-852c-51a42de9a412/doc/agroportal-infrastructure-ietsAU4kPs)